Arthur Reutenauer wrote:
Indeed, I've already seen that: when setting the locale to fr_FR.utf8, without resetting it to C just after the tex.print(), then I get this error: !luaTeX error (file /opt/TeX-live/texmf-dist/fonts/opentype/public/lm/lmroman12-regular.otf): Parsing CFF DICT failed. (error=-1) ==> Fatal error occurred, no output PDF file produced!
Interesting :-) I suppose some of the strings are localized (like, decimal points being replaced by decimal commas). I already had that when writing a small script to output PDF by hand.
Just about all string-to|from-float C functions (like strtod, scanf, atof, printf) and even the string-to|from-integer ones (strtol, scanf), are automatically influenced by the locale. The same is true for all tests like isspace() and isalpha(). It is intended to be helpful, but as a programmer I simply hate it. Cheers, Taco