[Rcpp-devel] Translate during coercion from String to Symbol?

Kirill Müller kirill.mueller at ivt.baug.ethz.ch
Sun Feb 19 00:02:14 CET 2017


It seems that R silently assumes that symbols are encoded in the native 
encoding. However, no attempt to reencode is made in Rf_installChar(), 
which is called by Symbol::Symbol(SEXP) in the CHARSXP case. I wonder if 
Rcpp should be calling Rf_install(Rf_translateChar(x)) instead, to 
ensure proper encoding.

Unfortunately, the better and faster Rf_installTrChar() isn't (yet) part 
of the API.

Best regards


More information about the Rcpp-devel mailing list