path: root/src/corelib/json/qjsonparser.cpp
diff options
authorThiago Macieira <>2013-10-20 17:43:46 +0100
committerThe Qt Project <>2014-01-09 22:34:54 +0100
commit8dd47e34b9b96ac27a99cdcf10b8aec506882fc2 (patch)
treebe92b77f4006e2b96683e5bfd4810db09a5b15ab /src/corelib/json/qjsonparser.cpp
parentd51130cc3a00df8147e2eb0799e06865c901c6e0 (diff)
Add a new UTF-8 decoder, similar to the encoder we've just added
Like before, this is taken from the existing QUrl code and is optimized for ASCII handling (for the same reasons). And like previously, make QString::fromUtf8 use a stateless version of the codec, which is faster. There's a small change in behavior in the decoding: we insert a U+FFFD for each byte that cannot be decoded properly. Previously, it would "eat" all bad high-bit bytes and replace them all with one single U+FFFD. Either behavior is allowed by the UTF-8 specifications, even though this new behavior will cause misalignment in the Bradley Kuhn sample UTF-8 text. Change-Id: Ib1b1f0b4291293bab345acaf376e00204ed87565 Reviewed-by: Olivier Goffart <> Reviewed-by: Thiago Macieira <>
Diffstat (limited to 'src/corelib/json/qjsonparser.cpp')
0 files changed, 0 insertions, 0 deletions