[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Future plans for Lua and Unicode
- From: Roberto Ierusalimschy <roberto@...>
- Date: Fri, 6 Jul 2012 09:52:41 -0300
> On Thu, Jul 5, 2012 at 9:27 PM, Roberto Ierusalimschy
> <email@example.com> wrote:
> > strings, not being arbitrary, can be used inside any kind of literal in
> > Lua ('...', "...", [[...]]) and also in comments without any problems.
> But identifiers (in particular) cannot be done in Greek, say. Lua
> 5.2 tightened the acceptable characters in identifiers?
Yes, but even in old versions you could not use Greek letters in
identifiers using UTF-8. Old versions used ctype, that strongly assumes
that each character is a single byte (and needs that assumption to check
whether characters are valid in identifiers).
LuaJIT has a different approach; it accepts any non-ascii character in
identifiers. That is a simple rule and allows letters from any language,
but it also allows some abuses:
stdin:1: attempt to perform arithmetic on global '−4∗3' (a nil value)