[Rd] Support writing UTF-8 output in Windows
Sverre Stausland
stausland.johnsen at iln.uio.no
Sun Nov 10 13:31:54 CET 2013
My e-mail was intended as a typical "feature request", and I couldn't
find any more suitable place for that than the r-devel mailing list. I
am not a programmer, so I don't have the skills to write this into R's
source code myself.
The incentive is nevertheless clear enough. I believe a software
program in 2013 which imports, manipulates, and exports text in
various formats (text files, picture files, postscript files, etc.)
would normally be expected to support UTF-8. It might not be trivial
to implement as R is written now, but the expectation will still be
there. So I still believe it would be a good idea if R soon would be
able to support UTF-8.
I'm not quite able to piece together from the information you gave
what the underlying issues are. What I read is:
(1) Some R functions convert characters to the native encoding.
(2) Windows did not support UTF-8 when R was first written.
(3) Unix did not support UCS-2 when R was first written.
I'm guessing here that the implications are:
(1) R's write.table() converts characters to a native encoding.
(2) The native encoding in Windows 7 is not UTF-8.
(3) The native encoding in Unix systems is UTF-8.
But this is just guesswork.
PS. A related issue:
http://stackoverflow.com/questions/19881553/using-unicode-inside-rs-expression-command
Sverre
More information about the R-devel
mailing list