Thread overview
[Issue 12897] std.json.toJSON doesn't translate unicode chars(>=0x80) to "\uXXXX"
Jul 11, 2014
Justin Whear
Jul 12, 2014
egustc@gmail.com
Mar 22, 2016
b2.temp@gmx.com
Mar 21, 2020
Basile-z
July 11, 2014
https://issues.dlang.org/show_bug.cgi?id=12897

Justin Whear <justin@economicmodeling.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |justin@economicmodeling.com

--- Comment #1 from Justin Whear <justin@economicmodeling.com> ---
Looking at the spec (http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf) it appears that while strings _may_ encode characters using the escape sequence, they are not _required_ to for any range of characters.  On the face of it it seems that std.json is conformant and other languages are not.  Which parsers are unable to handle the raw UTF-8?

--
July 12, 2014
https://issues.dlang.org/show_bug.cgi?id=12897

--- Comment #2 from egustc@gmail.com ---
OK... I used Python but didn't decode first and got a problem.

(In reply to Justin Whear from comment #1)
> Looking at the spec (http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf) it appears that while strings _may_ encode characters using the escape sequence, they are not _required_ to for any range of characters.  On the face of it it seems that std.json is conformant and other languages are not. Which parsers are unable to handle the raw UTF-8?

--
March 22, 2016
https://issues.dlang.org/show_bug.cgi?id=12897

b2.temp@gmx.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
                 CC|                            |b2.temp@gmx.com
           Assignee|nobody@puremagic.com        |b2.temp@gmx.com

--- Comment #3 from b2.temp@gmx.com ---
(In reply to egustc from comment #2)
> OK... I used Python but didn't decode first and got a problem.
> 
> (In reply to Justin Whear from comment #1)
> > Looking at the spec (http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf) it appears that while strings _may_ encode characters using the escape sequence, they are not _required_ to for any range of characters.  On the face of it it seems that std.json is conformant and other languages are not. Which parsers are unable to handle the raw UTF-8?

I propose a PR for this (https://github.com/D-Programming-Language/phobos/pull/4106), but it was not clear if you considered the problem as fixed or not.

Maybe it can even be closed without any modification. Let's see what people say.

--
April 10, 2016
https://issues.dlang.org/show_bug.cgi?id=12897

--- Comment #4 from github-bugzilla@puremagic.com ---
Commit pushed to master at https://github.com/D-Programming-Language/phobos

https://github.com/D-Programming-Language/phobos/commit/b5cd354a05033ade13ae376377bec590bef62212 Merge pull request #4106 from BBasile/issue-12897

fix issue 12897 - toJSON, add the escapeNonAsciiChars option

--
April 10, 2016
https://issues.dlang.org/show_bug.cgi?id=12897

github-bugzilla@puremagic.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED

--
March 21, 2020
https://issues.dlang.org/show_bug.cgi?id=12897

Basile-z <b2.temp@gmx.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|b2.temp@gmx.com             |

--