Skip to content

luaotfload-unicode.lua fails when near UnicodeData.txt #335

Description

@nxg

The program luaotfload-tool fails when a file UnicodeData.txt is in the current directory.

% luaotfload-tool --update
% echo hello >UnicodeData.txt
% luaotfload-tool --update
.../texmf-dist/tex/luatex/luaotfload/luaotfload-unicode.lua:108: assertion failed!
stack traceback:
[C]: in function 'assert'
.../texmf-dist/tex/luatex/luaotfload/luaotfload-unicode.lua:108: in main chunk
[C]: in function 'require'
...texmf-dist/tex/luatex/luaotfload/luaotfload-database.lua:202: in main chunk
[C]: in function 'require'
/Library/TeX/texbin/luaotfload-tool:167: in local 'loadmodule'
/Library/TeX/texbin/luaotfload-tool:188: in main chunk

Running lualatex also fails in this situation. Removing the file UnicodeData.txt from the current directory is enough to make both programs work again. The above is with a dummy file; it fails in exactly the same way with the real UCD file there.

The lines 107--109 in question are

local f = io.open(kpse.find_file"UnicodeData.txt")
assert(file:match(f:read'*a'))
f:close()

I appreciate this is unlikely to affect many people, and the workaround I can apply is obvious, but this is presumably not quite working as designed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions