Skip to content
Back to formatted view

Raw Message

Message-ID: <22696.54875.916232.407743@max.eddelbuettel.com>
Date: 2017-02-18T23:18:51Z
From: Dirk Eddelbuettel
Subject: [Rcpp-devel] Translate during coercion from String to Symbol?
In-Reply-To: <8153c256-f82f-1d71-383e-1a7a4feae703@ivt.baug.ethz.ch>

On 19 February 2017 at 00:02, Kirill M?ller wrote:
| 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.

That's entirely possible.

As you seem to know what code parts you looked at, would you mind sharing
that information so that we know better exactly _what_ you are talking about?
 
| Unfortunately, the better and faster Rf_installTrChar() isn't (yet) part 
| of the API.

Worst case we mock, copy or reimplement it.  Ultimately there may well be
changes coming down the road because of the Leeper + Cotton i18n project.

Dirk

-- 
http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org