lua-users home
lua-l archive

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


On Fri, Oct 25, 2019 at 2:30 AM bil til <flyer31@googlemail.com> wrote:
>
> Thank you, I looked at the source code.
>
> I am just bewildered, because only a very small part is this lctype.c,
> lctype.h named "throw error early for bytes not used at all in UTF-8
> (0xC0...)".
>
> But the main code of this gitub link is "....lua" source code? I would
> expect that the necessary changes ONLY apply to c sourcecode, but NOT to lua
> code?

The important stuff is in the src directory. The repository was pretty
messy. I've cleaned it up a bit and added a patch file, which shows
the changes. To use the patch, I unpack a fresh copy of Lua 5.3.5 and
invoke these commands in the top directory:

patch -p1 < utf8_identifiers.patch
make linux 'MYCFLAGS=-D ALLOW_UTF8_IDENTIFIERS'

There are two Lua files, which you don't need: the tests, and
make_data.lua, which generates the Unicode data from
DerivedCoreProperties.txt in the Unicode Character Database and
modifies src/unicodeid_template.h to create src/unicodeid.h.