With XEmacs 21.5.x, it appears to be impossible to start a process in
an UTF-8 locale and give non-ASCII text as command line arguments.
This is very annoying, no external program works correctly
anymore if a non-ASCII command line is needed. For example
M-x grep
doesn't work anymore when grepping for non-ASCII and playing .mp3
files with mpg123.el doesn't work anymore if the filenames are
non-ASCII because they are given as arguments to the external mpg123
program.
A small lisp file start-process-bug.el to show the problem is
attached.
When trying this test file with XEmacs 21.5.18, the result is as
follows (should better be tried in an UTF-8 capable environment to see
the output correctly):
mfabian@magellan:~/xemacs-bug$ xemacs -q -batch -l start-process-bug.el
XEmacs 21.5 (beta18) "chestnut" (+CVS-20041021) [Lucid] (x86_64-suse-linux,
Mule) of Fri Dec 31 2004 on magellan
mfabian@magellan:~/xemacs-bug$
And now the output file contains:
mfabian@magellan:~/xemacs-bug$ cat /tmp/start-process-bug
A~
mfabian@magellan:~/xemacs-bug$
mfabian@magellan:~/xemacs-bug$ hex < /tmp/start-process-bug
0000 41 7e e4 0a A~..
mfabian@magellan:~/xemacs-bug$
I.e. the letter 'A' has arrived correctly but the hiragana 'あ' has
been converted into a '~' and the ä has been written as Latin1 and not
UTF-8.
This used to work with XEmacs 21.4.x. Trying the same test with XEmacs
21.4.15 gives the following result:
mfabian@baker:~/xemacs-bug$ xemacs -q -batch -l start-process-bug.el
XEmacs 21.4 (patch 15) "Security Through Obscurity" [Lucid]
(i386-suse-linux, Mule) of Thu Oct 14 2004 on appolonius
requiring un-define ...
mfabian@baker:~/xemacs-bug$ cat /tmp/start-process-bug
Aあä
mfabian@baker:~/xemacs-bug$ hex < /tmp/start-process-bug
0000 41 e3 81 82 c3 a4 0a A......
mfabian@baker:~/xemacs-bug$
which is correct.
--
Mike FABIAN <mfabian(a)suse.de>
http://www.suse.de/~mfabian
睡眠不足はいい仕事の敵だ。