From stausland.johnsen at iln.uio.no  Sun Nov 10 13:31:54 2013
From: stausland.johnsen at iln.uio.no (Sverre Stausland)
Date: Sun, 10 Nov 2013 13:31:54 +0100
Subject: [Rd] Support writing UTF-8 output in Windows
In-Reply-To: <527E9533.4070609@gmail.com>
References: <CACtaF7xhmkyuALWyB3LZqEwBAwDwO6J5z5YM6ThQQ=0MuNZY6A@mail.gmail.com>
	<527E9533.4070609@gmail.com>
Message-ID: <CACtaF7wX8JcAhovaxnyvJVqJFBEeOcS6THzN7AEfP7_kv4U7eQ@mail.gmail.com>

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



[Rd] Support writing UTF-8 output in Windows
Sverre Stausland