![]() ![]() ![]() ![]() The confusing one is that strings can also be tagged with an "unknown" encoding I don't know what to do in that case so I'll wait until it becomes a problem. The R man page for Encoding() adds interesting information, although potentially confusing one. My understanding of some of R's own documentation is that strings can only be encoded in Latin1, or in UTF-8ĬE_NATIVE will indicate which one of the two is considered the native encoding. I guess that internally R is using a strategy to minimize the number of bytes used. However, R may decide to encode each string in an array differently. This part of the chain should be fine because no matter the original encoding of the Python string or your locale UTF-8 is the way things are passed to R. They have made an unofficial experimental build of R 4 which uses the UTF-8 encoding, but it is incompatible with a number of compiled modules. The Python string is encoded in UTF-8 (function conversion._str_to_cchar()) before being passed to R. No R uses the cp1252 encoding on all officially released versions of Windows so far. The Python string itself will have to be passed to R using conversion._str_to_charsxp(). Is trying to let evaluate the string as R code the same way it would happen if rpy2 was not involved.
0 Comments
Leave a Reply. |