Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support for escaped chars in U+1xxxx range. (#60)
* Don't over-allocate strings with \u00xx escape sequences. * data_size: off-by-one, one caracter is always allocated at the begin of the loop. * offset: not advanced enough, counting characters at the end of the \u00xx sequence twice. v2: clang-format * Support for escaped chars in U+1xxxx range. U+1F603 '😃' can be escaped to "\uD83D\uDE03" see https://tools.ietf.org/id/draft-ietf-json-rfc4627bis-09.html#rfc.section.7 To escape an extended character that is not in the Basic Multilingual Plane, the character is represented as a twelve-character sequence, encoding the UTF-16 surrogate pair. So, for example, a string containing only the G clef character (U+1D11E) may be represented as "\uD834\uDD1E". v2: add comments
- Loading branch information
Showing
2 changed files
with
69 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters