lunarmodules / luacheck

A tool for linting and static analysis of Lua code.

Home Page:https://luacheck.readthedocs.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

luacheck doesn't allow non-ascii symbols in unquoted strings

ligurio opened this issue · comments

non-ascii symbols in Привет = 1 triggers error in luacheck:

Checking r.lua                                    1 error

    r.lua:1:1: expected statement near 'П'

Total: 0 warnings / 1 error in 1 file

To workaround one can use quotes: ['Привет'] = 1.

Luacheck: 0.23.0
Lua: LuaJIT 2.1.0-beta3
Argparse: 0.6.0

Clone of mpeterv#207

Thanks for moving this issue over.

Just to add to this from the previous thread, in my findings none of the mainline Lua releases support this,s but LuaJIT does. It would be nice to find documentation on exactly which versions support this, and what the rules/limitations for it are. Any support in luacheck would have to take that info into account.