[kepler-dev] [Bug 4270] - RExpression exports special characters in strings as the 2 character escaped sequence

bugzilla-daemon at ecoinformatics.org bugzilla-daemon at ecoinformatics.org
Thu Jul 30 09:37:20 PDT 2009


http://bugzilla.ecoinformatics.org/show_bug.cgi?id=4270





------- Comment #5 from soong at nceas.ucsb.edu  2009-07-30 09:37 -------
I did a little digging, and the escape sequences R uses in deparsing (core of
dput) seems to be handled in the EncodeString function in printutils.c. 
There's a very minor discrepancy with the escape sequences used by Java (see
http://java.sun.com/docs/books/jls/second_edition/html/lexical.doc.html#101089).

The discrepancies seem to be \a, \v, and \0 (audible bell, vertical tab, and
null).  A fix would be to use replaceAll after the unescapeJava, but it's
complicated because these three aren't Java escape sequences, so we would have
to look up the appropriate octal or unicode escape in Java.

I doubt anybody will actually use these in practice, so it's unlikely to cause
any real problems.  I'm deferring judgment and leaving this as closed.


More information about the Kepler-dev mailing list