[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: UTF-8 identifiers [was: Re: Lua t-shirts]
- From: Sean Conner <sean@...>
- Date: Mon, 5 Oct 2009 15:58:04 -0400
It was thus said that the Great Philippe Lhoste once stated:
>
> I believe the historical reason for this choice goes back when Lua was used
> as data metalanguage: it allows to use locale names as keys for tables:
>
> a = { Roméo = "Juliette", César = "Brutus" }
>
> Although I cannot test that because it seems that on Windows it defaults to
> C locale and refuses to change (unless I am doing something wrong).
> I tried with Web Lua but it doesn't expose os table (I can understand
> why...).
> Ah, I can do that in Lua.org live demo but I still can't change the locale.
> Perhaps I am doing something wrong?
I can't do it, and my locale is currently set for "en_US.UTF-8". I then
tried the following:
> os.setlocale("es.UTF-8")
> a = { Roméo = "Juliette", César = "Brutus" }
stdin:1: '}' expected near '�
> os.setlocale("es")
> a = { Roméo = "Juliette", César = "Brutus" }
stdin:1: '}' expected near '�
> os.setlocale("br")
> a = { Roméo = "Juliette", César = "Brutus" }
stdin:1: '}' expected near '�
I too, would like to know what I'm doing wrong ...
-spc (looks like glibc isn't picking up on the locale properly?)
- References:
- Re: Lua t-shirts, Patrick Donnelly
- Re: Lua t-shirts, Phoenix Sol
- Re: Lua t-shirts, Stefan
- Re: Lua t-shirts, Peter Cawley
- Re: Lua t-shirts, steve donovan
- Re: Lua t-shirts, David Given
- UTF-8 identifiers [was: Re: Lua t-shirts], Ico
- Re: UTF-8 identifiers [was: Re: Lua t-shirts], Jerome Vuarand
- Re: UTF-8 identifiers [was: Re: Lua t-shirts], David Given
- Re: UTF-8 identifiers [was: Re: Lua t-shirts], Philippe Lhoste