The parser was lenient in accepting backslashes followed by invalid
characters, but accidentally sign-extended everything above 0x7f causing
broken outputs that weren't valid UTF-16 either.
For example, the sequence "\\\xff" (backslash followed by 0xff) produced
sequence "\ud7bf\udfff" (U+D7BF is not a surogate pair).
Change-Id: Ie72b0dd0fbe84d2caae0fffd16a113c703a7696f
Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>