lua-users home
lua-l archive

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


2014-04-17 9:40 GMT+02:00 Oliver Kroth <oliver.kroth@nec-i.de>:
> to my knowledge in most "big" OS, there are already libraries for handling
> Unicode semantics.
> I'd like to propose to let Lua do the UTF-8 encoding matters, and use a
> (probably OS-specific) glue library to refer the Unicode semantics to the
> underlying OS. This library may e.g. be named "unicode" to avoid name
> clashes with utf8.
>
> There is no sense in re-inventing the wheel.

Invoking OS support is not as well supported in Lua as in e.g. Perl.

One intensely annoying restriction that Lua suffers, out of portability
considerations no doubt, is that we can only have a write-to pipe or
a read-to pipe, not a filter. I'd love to write

   textout = os.filter("iconv -f windows-1250 -t utf8",textin)

I have my own 'filter', of course, but it irks me that the function
needs to create an explicit temporary file.