Hacker News new | ask | show | jobs
by jacques_chester 5258 days ago
> add unicode support

This won't happen soon. Lua targets ANSI C and only ANSI C.

C11 includes new character types to support unicode, but I imagine that the Lua implementers will take their time.

Plus there's implications for embedded situations.

If you need unicode (and most do), there are libraries and patches that do a reasonable job.

1 comments

I'm fine with C-style strings, but once in a while there are things for which a bit of UTF-8 tagging would be good enough.
Lua strings aren't C-style: they're prefixed with the string length. Lua's strings are suitable enough to store UTF-8 encoded data, but none of Lua's built-in functions are equipped to process it. Unicode libraries don't need to provide a special Unicode string type, they simply need to provide Unicode-aware string processing functions.
Right. I meant "C-style" in the sense of Lua being oriented around the kind of single/multibyte encodings used with ANSI C (as contrasted with kind of the UCS-2 and UTF-16 stuff you get with Win32 and Java).