Skip to content

Commit

Permalink
Modified reading of character strings to create CHARSXPs with the
Browse files Browse the repository at this point in the history
right encoding rather than modify the encoding afterwards.


git-svn-id: https://svn.r-project.org/R/trunk@43057 00db46b3-68df-0310-9c12-caf00c1e9a41
  • Loading branch information
luke committed Oct 2, 2007
1 parent 3fe444d commit 0ad0472
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/serialize.c
Original file line number Diff line number Diff line change
Expand Up @@ -1333,11 +1333,11 @@ static SEXP ReadItem (SEXP ref_table, R_inpstream_t stream)
cbuf = alloca(length+1);
InString(stream, cbuf, length);
cbuf[length] = '\0';
PROTECT(s = mkChar(cbuf));
PROTECT(s = mkCharEnc(cbuf, levs & (LATIN1_MASK | UTF8_MASK)));
} else {
cbuf = CallocCharBuf(length);
InString(stream, cbuf, length);
PROTECT(s = mkChar(cbuf));
PROTECT(s = mkCharEnc(cbuf, levs & (LATIN1_MASK | UTF8_MASK)));
Free(cbuf);
}
break;
Expand Down

0 comments on commit 0ad0472

Please sign in to comment.