[Rd] String encoding problem

Duncan Murdoch murdoch.duncan at gmail.com
Thu Jul 7 17:11:56 CEST 2016


On 07/07/2016 10:57 AM, Hadley Wickham wrote:
> If you print:
>
> "\xc9\x82\xbf"
>
> you get
>
>  "\u0242\xbf"
>
> But if you try and evaluate that string you get:
>
>>  "\u0242\xbf"
> Error: mixing Unicode and octal/hex escapes in a string is not allowed
>
> (Probably will only happen on mac/linux with default utf-8 encoding)

I'm not sure what should happen here, but that's not a legal string in a 
UTF-8 locale, so it's not too surprising that things go wonky.

Duncan Murdoch



More information about the R-devel mailing list