lua-users home
lua-l archive

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


The test files are here: 

https://github.com/lua/lua/tree/master/testes

Those are the only test files that aren't UTF-8:

$ iconv -f UTF-8 *.lua >/dev/null 
iconv: db.lua:348:33: cannot convert
iconv: files.lua:95:18: cannot convert
iconv: pm.lua:76:19: cannot convert
iconv: sort.lua:292:7: cannot convert
iconv: strings.lua:94:39: cannot convert

In fact, they’re the only files in the entire tree that aren’t UTF-8.

And they’re definitely ISO-8859-1:

$ file db.lua 
db.lua: ISO-8859 text

$ file files.lua 
files.lua: ISO-8859 text

$ file pm.lua 
pm.lua: ISO-8859 text

$ file sort.lua 
sort.lua: ISO-8859 text

$ file strings.lua 
strings.lua: ISO-8859 text

One example of encoding-dependent byte counting is here:

https://github.com/lua/lua/blob/ea39042e13645f63713425c05cc9ee4cfdcf0a40/testes/files.lua#L303

There are more.

I’m letting the maintainers know because I suspect that this is historical rather than intentional. 

Now that they know, they can decide whether or not they care. :-)​

Michael