lua-users home
lua-l archive

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


> I can actually think of a fourth solution, although it will be probably
> be received as rather hack-ish.  You can add two new functions,
> string.upgrade and string.downgrade, which marks a string as UTF-8 or
> "non-UTF-8".

This is in fact very similar to the way Perl handles Unicode [1]
And to my experience, it works quite well.
Also, if Lua supports UTF-8, it will have to accept UTF-8 filenames on Windows.
Jérôme Vuarand has written a patch for this [2], perhaps it will be
included in vanilla Lua one day. ?

[1] http://perldoc.perl.org/utf8.html
[2] http://hg.piratery.net/electronmeat/src/tip/srcweb/lua-5.1.4/lua-wstring.patch