<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent changes to 139: wrong parsing of unicode escapes</title><link href="https://sourceforge.net/p/wxcode/bugs/139/" rel="alternate"/><link href="https://sourceforge.net/p/wxcode/bugs/139/feed.atom" rel="self"/><id>https://sourceforge.net/p/wxcode/bugs/139/</id><updated>2012-03-27T13:10:25Z</updated><subtitle>Recent changes to 139: wrong parsing of unicode escapes</subtitle><entry><title>wrong parsing of unicode escapes</title><link href="https://sourceforge.net/p/wxcode/bugs/139/" rel="alternate"/><published>2012-03-27T13:10:25Z</published><updated>2012-03-27T13:10:25Z</updated><author><name>Anonymous</name><uri>https://sourceforge.net/u/userid-None/</uri></author><id>https://sourceforge.net3aacfaaf5fc7d2c4027426e3a79446afd1359459</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;There is:&lt;br /&gt;
// seems that the wxMBConv classes always appends a NULL byte to&lt;br /&gt;
// the converted buffer&lt;br /&gt;
if ( len &amp;gt; 1 )    {&lt;br /&gt;
len = len - 1;&lt;br /&gt;
}&lt;br /&gt;
in jsonreader. cpp. This appears not true, at least in wxwidgets 2.9.3 on Windows, Consult:&lt;br /&gt;
&lt;a href="http://docs.wxwidgets.org/2.8/wx" rel="nofollow"&gt;http://docs.wxwidgets.org/2.8/wx&lt;/a&gt;_wxmbconv.html#wxmbconvtowchar&lt;/p&gt;
&lt;p&gt;This causes json documents like &lt;br /&gt;
["\u00ae"] &lt;br /&gt;
to not parse correctly (the document contains the registered sign, "®") The error is:&lt;/p&gt;
&lt;p&gt;JSON parse error Error: line 1, col 10 - String value: the UTF-8 stream is invalid&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>