[R-SIG-Mac] R for Mac OS X Aqua GUI and utf-8

joerg van den hoff j.van_den_hoff at fz-rossendorf.de
Tue Dec 21 11:28:03 CET 2004

Simon Urbanek wrote:
> Hi Joerg,
> On Dec 20, 2004, at 9:12 AM, joerg van den hoff wrote:
>> I have noticed some mails concerning this in the archive, so I 
>> understand this has been already discussed and I understand that the R 
>> gui seems to use utf-8 internally.
>> I did _not_ find out how to procede, if I the only thing I want is to 
>> obtain 'R command line version behaviour' with encoding set to 
>> something like latin1. i.e. I would be  glad if I would be able to get 
>> things like a german 'umlaut' into string constants (and then into 
>> plots).
>> is there such a way?
> Currently, no. The problem is quite complex, because just using Latin1 
> for the console (i.e. convert everything going into R to Latin1 and do 
> so for R output too) does break anything where R passes strings to the 
> OS - like file and directory names. I could add an option that switches 
> such behavior on, but then the user has to be careful about using 
> non-ASCII characters in filenames/paths.
> I'll investigate another path though - we should be able to fix the plot 
> thing reasonably easily, because it's Cocoa so handling UTF-8 is no 
> issue. About the string output - I'll have to see if there is a way to 
> convert strings on-the-fly when printing - in theory it should be 
> possible, I'll check it out.
> Cheers,
> Simon
hello simon,
thanks for the quick response.
I think a switch in the preferences would be perfectly ok: if the 
default is the current behaviour the user should be aware of the 
implication for 'valid' file names (as far as I am concerned: I simply 
do use only 7(!)-bit ascii names anyway to avoid any problems in this area).
after all that would be exactly what the command line version does at 
the moment anyway (if encoding is set to latin1).
I think in this way the major restriction (not being able to process 
8-bit character sets) would be removed.

thanks again and best regards,

More information about the R-SIG-Mac mailing list