[ESS] German umlaute in ESS, Emacs & R
Martin Maechler
maechler at stat.math.ethz.ch
Thu Jul 31 18:30:16 CEST 2008
>>>>> "es" == enno sandkasten <enno_sandkasten at arcor.de>
>>>>> on Thu, 31 Jul 2008 11:17:38 +0200 (CEST) writes:
es> Hi list,
es> I use GNU Emacs 22.2.1 (i386-mingw-nt5.1.2600) of 2008-03-26 on Windows XP and ESS Version 5.3.7, both downloaded from http://vgoulet.act.ulaval.ca/en/ressources/emacs/, and R version 2.7.1 for Windows.
es> My problem is that Emacs cannot handle german umlaute as R variable names:
>> ä <- 3
es> Error: unexpected input in "\201"
es> This does not occur in RGui.exe. I think this is more an emacs than ess problem, but maybe there are any suggestions.
Yes, it seems an Emacs rather than ESS problem, also visible on
Linux.
I can reproduce the problem also by starting R from the *shell* (M-x
shell) buffer, hence it's not related to ESS,
but most probably related to how emacs uses the 'comint-*'
functions to communicate with the "inferior" process.
I see the problem in all cases (within Emacs),
both when then emacs-input (and -output method of the process is set to
utf-8 or iso-latin-1 respectively {C-x RET p ...;
C-x RET C-h shows you the list} and both for my default unicode
utf-8 locale and with the C locale.
OTOH, I can use 'ä' in the emacs shell more less fine:
I can use it for input, but it does not correctly render for
output.
$ touch ä << shows Umlaut
$ ls -l ä << shows Umlaut
-rw-r--r-- 1 maechler sfsstaff 0 Jul 31 18:25 ? << shows question mark
"?" (
$ . /u/sfs/adm/locale-deCH-UTF8.sh
$ ls -l ä <
-rw-r--r-- 1 maechler sfsstaff 0 Jul 31 18:25 ?
$ echo BLA >> ä
$ ls -l ä
-rw-r--r-- 1 maechler sfsstaff 4 Jul 31 18:25 ?
BTW: I would never use non-ASCII characters in variable names,
but that's really a separate issue;
and I can imagine people having "good" reasons to do so.
Note that it *can* dangerous: I see different files created by
'touch ä' depending on the locale (ISO-latin-1 vs Unicode UTF-8)
Martin
More information about the ESS-help
mailing list