Hello, I was reading through serialize.c and i couldn't answer something. In readItem, case CHARSXP, rules exists to adjust the read string for string encoding. Q1. I couldn't find where the encoding of the elements of the string vector are written? Is it when writeItem writes out the attributes of the item? But i couldn't find encoding in the attributes field x <- "fa\xE7ile" Encoding(x) <- "latin1" xx <- iconv(x, "latin1", "UTF-8") y=c(x,xx) attributes(y) NULL Apologies if this has been asked before Regards Saptarshi [[alternative HTML version deleted]]
On 14-02-03 3:41 AM, Saptarshi Guha wrote:> Hello, > > I was reading through serialize.c and i couldn't answer something. > > In readItem, case CHARSXP, rules exists to adjust the read string for > string encoding.This is described in the R Internals manual. Duncan Murdoch> > Q1. I couldn't find where the encoding of the elements of the string vector > are written? Is it when writeItem writes out the attributes of the item? > But i couldn't find encoding in the attributes field > > x <- "fa\xE7ile" > Encoding(x) <- "latin1" > xx <- iconv(x, "latin1", "UTF-8") > y=c(x,xx) > attributes(y) > > NULL > > Apologies if this has been asked before > Regards > Saptarshi > > [[alternative HTML version deleted]] > > ______________________________________________ > R-devel at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel >
Seemingly Similar Threads
- Value of SET_STRING_ELT() must be a 'CHARSXP' not a 'character' & 'getEncChar' must be called on a CHARSXP
- base::order breaking change in R-devel
- Unable to build with working iconv support on Solaris9/x86
- error unserializing ascii format (v2 or v3)
- What is the fastest way to see what are in an RData file?