LuaTeX error: "Unable to read environment locale:exit now."

I can confirm the same using cygwin texlive 2017 it is enough to set

export LANG="en_DE.UTF-8" 


lualatex testfile

to get

Unable to read environment locale:exit now.

You should raise this on the luatex list, or I could, although en_DE seems like a strange locale. German English?

Setting LANG to (say) en_US makes it work again.

It has been confirmed in the thread on the luatex list starting at

http://tug.org/pipermail/luatex/2017-June/006576.html

that it is by design that luatex quits on unknown locale, although they may try to make the error message a bit more helpful.

en_DE seems a strange value, depending on your operating system you may be able to use

locale -a

to list all the known values.

On my system

locale -a | grep en_

lists 37 en_ variants, but en_DE is not one of them.

So I would not fix this in the emacs editor setup but rather set your locale to something other than en_DE in your shell.


Changing the locale in my shell configuration file did not solve the problem. I found the reason here: locale when launching Emacs.app on OS X.

What did solve the problem was either adding %%% eval: (setenv "LANG" "de_DE.UTF-8") to my source file, as suggested in the comments, or adding this line to .emacs file: (setenv "LANG" "en_US.UTF-8").

Tags:

Luatex