Closed kevinushey closed 8 years ago
Can probably use ::wcrtombs()
here: http://en.cppreference.com/w/cpp/string/multibyte/wcrtomb. But there are probably subtleties in handling encoding that I don't understand yet.
Implemented now as stringValue()
member function: https://github.com/kevinushey/sourcetools/blob/a8f0705149a381db9d9bd10e74996e7395b4a51c/inst/include/sourcetools/tokenization/Token.h#L332-L397
E.g. handling:
\127
\xFF
\u1234
,\u{1234}
,\U{12345678}
Not strictly necessary since we are more interested in the textual contents of the document rather than their interpretation.