[R] R does not support UTF-8 (was german umlaut problem under MacOS)
joerg van den hoff
j.van_den_hoff at fz-rossendorf.de
Wed Dec 15 18:13:35 CET 2004
Brian D Ripley wrote:
> You wrote your mail in UTF-8. R does not support UTF-8, and that is both
> documented and announced on startup in such a locale (at least on OSes
> with standard-conforming implementations):
thanks for clarifying this point.
nevertheless:
1. the mail was (on purpose) sent in utf-8 to transport correctly the
output from the R command window (i.e. the GUI provided with the macOS
port). it is _this_ GUI (sorry for not explaining this correctly in the
first place) where the problem occurs. I'm not using (knowingly at
least) utf-8.
when starting the same binary from the command line in a terminal (where
I generally use ISO Latin 1 encoding) it is perfectly possible to get
the special characters into variables and into plots.
2. the OS is macos 10.3, i.e. essentially FreeBSD derivative and
hopefully conforms to the standardsbu R on startup in the GUI gives only:
========cut=============
R : Copyright 2004, The R Foundation for Statistical Computing
Version 2.0.1 (2004-11-15), ISBN 3-900051-07-0
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for a HTML browser interface to help.
Type 'q()' to quit R.
R>
========cut=============
i.e. no announcement whatsoever concerning missing utf-8 support,
despite the fact that following input is interpreted in such a way.
so, probably this is more a question to the maintainers of the macOS
port:_where_ did R (when startet with the GUI) get the notion that it
should interpret keyboard input as utf-8? can I change this (it's not
in the preferences, for instance)?
>
> gannet% env LANG=en_GB.utf8 R
>
> R : Copyright 2004, The R Foundation for Statistical Computing
> Version 2.0.1 (2004-11-15), ISBN 3-900051-07-0
> ...
> WARNING: UTF-8 locales are not currently supported
>
> Solution: do not use an unsupported locale.
>
>
> On Wed, 15 Dec 2004, joerg van den hoff wrote:
>
>
>>I did not find this in the archive (hope it isn't there...):
>>
>>the current release of R (2.0.1) for MacOS (10.3.6) seems not to handle
>>german special characters like 'ü' correctly:
>
>
> I get two characters (Atilde quarter) here.
>
>
>> > f <- 'ü'
>>
>>can be entered at the prompt, but echoing the variable yields
>
>
> You mean printing the contents, I presume.
yes ("shell speak").
>
>
>>[1] "\303\274" (I think the unicode of the character)
>>
>>and inserting, for instance
>>
>>text(1,2,f)
>>
>>in some plot seems to insert two characters (âº) (probably an
>>interpretation of the first and second group of the unicode?).
>>
>>I believe, this is a R problem or is there a simple configuration switch?
>>
>>
>>thanks
>>
>>joerg
>>
>>______________________________________________
>>R-help at stat.math.ethz.ch mailing list
>>https://stat.ethz.ch/mailman/listinfo/r-help
>>PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>>
>
>
regards,
joerg
More information about the R-help
mailing list