lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

On Fri, Feb 18, 2005 at 03:35:57PM +0100, PA wrote:
> >A tip: using a real name on technical lists will tend to get you
> >a better response.
> Right... this is email... there is no such a thing as a "read name" :)

But that's a silly attitute.  We're real people, with real names; there's
no need to hide who we are.  That's one reason many don't really take people
who use pseudonyms on technical lists--the one sore-thumb "Gandalf" among a
hundred real names in our mail index--very seriously.  (Not a flame, honest--
just trying to help.  :)

> Ok. So Lua's encoding reflects the OS encoding?

I'm not sure what effects the system encoding has on Lua.  Klaus mentioned
that gsub works with UTF-8, at least; I don't know about other encodings.

> The application is in Lua.

> I'm working on a web server. In Lua.

> >One generally extends a webserver with Lua--one doesn't write one *in* 
> >Lua.  :)
> There is a first for everything.

I'm not saying one can't; I'm saying one normally does not.  Lua is an
extension language; extending is what it's good at.  If you're writing
a whole application in it, you'll quickly find out what the difference
is--it's not good at it, and isn't supposed to be.

Basically, "you're doing it wrong".  (Which you can do if you want, but
I don't think it'll be considered a bug when it doesn't have features
of an application language.)

Conversion is complicated: you have to know your source and destination
encodings, and you have to pick how you're converting--eg. "use placeholder
characters for missing codepoints?", "which UTF-8 normalization form?",
etc.; and you have a completely different system API in Windows; and you
have to figure out what to do on systems with none of this.  Lua's simple
file interface, at least, shouldn't be dealing with this stuff or making
these decisions.

(That's not to say Lua couldn't use some more i18n help, but figuring out
what it might need--presumably as extensions, not core features--should
be approached from use cases that Lua is meant for, IMO.)

Glenn Maynard