#139 wrong parsing of unicode escapes

open
nobody
wxJSON (16)
5
2012-03-27
2012-03-27
Anonymous
No

There is:
// seems that the wxMBConv classes always appends a NULL byte to
// the converted buffer
if ( len > 1 ) {
len = len - 1;
}
in jsonreader. cpp. This appears not true, at least in wxwidgets 2.9.3 on Windows, Consult:
http://docs.wxwidgets.org/2.8/wx_wxmbconv.html#wxmbconvtowchar

This causes json documents like
["\u00ae"]
to not parse correctly (the document contains the registered sign, "®") The error is:

JSON parse error Error: line 1, col 10 - String value: the UTF-8 stream is invalid

Discussion


  • Anonymous
    2012-03-27

    • summary: wrongh parsing of unicode escapes --> wrong parsing of unicode escapes