Skip to content
Prev 309185 / 398506 Next

Encoding

On 12-10-27 7:28 AM, Eva Prieto Castro wrote:
One likely problem is that you need to declare in the DESCRIPTION file 
which encoding you are using.  The other problem is that you may not be 
consistently using UTF-8 encodings.  Since your system (as shown below) 
defaults to Latin1, files produced by R will default to Latin1 encoding. 
  If you consistently use Latin1 and declare that in the DESCRIPTION, 
your Mac should be able to work with the package.

In your other message you mentioned Unicode and UCS-2.  UCS-2 is not 
UTF-8, they are different.  "Unicode" is ambiguous, but on Windows it 
generally means UCS-2.  As you found, R can read that, but it's not used 
by default, so I would avoid it.

One other approach to this is to avoid non-ASCII characters.  Then UTF-8 
and Latin1 are the same, and you won't run into problems.  But if you 
are writing Spanish, that's not easy.

Duncan Murdoch