This question already has an answer here:
texexec --once --texutil --engine=xetex --interface=en --nonstop tmp.tex'
gives the following error message when called from Emacs, but not when called from Terminal:
require': /opt/local/share/texmf-local/scripts/context/ruby/base/switch.rb:501: invalid multibyte escape: /\xFF/ (SyntaxError)
from /opt/local/share/texmf-local/scripts/context/ruby/texexec.rb:11:in `'
The offending piece of code is
value.gsub(/\xFF/o, ' ')
At this point, I'll be grateful for everything from what to do to make the code run from Emacs, to a patch to the code.
LC_ALL are the same in both Emacs and Terminal.