emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[debbugs-tracker] bug#24784: closed (26.0.50; JSON strings with utf-16 e


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#24784: closed (26.0.50; JSON strings with utf-16 escape codes)
Date: Sun, 01 Jan 2017 12:27:02 +0000

Your message dated Sun, 01 Jan 2017 12:26:07 +0000
with message-id <address@hidden>
and subject line Re: bug#24784: 26.0.50; JSON strings with utf-16 escape codes
has caused the debbugs.gnu.org bug report #24784,
regarding 26.0.50; JSON strings with utf-16 escape codes
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
24784: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=24784
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: 26.0.50; JSON strings with utf-16 escape codes Date: Mon, 24 Oct 2016 20:06:18 +0200
json-read-from-string doesn't parse strings correctly if the the \u
syntax is used to write UTF-16 surrogates:

 (equal (json-read-from-string "\"\\uD834\\uDD1E\"") "\"\U0001D11E\"")
 => nil

The correct result t.  To quote RFC 7159[*]:

   To escape an extended character that is not in the Basic Multilingual
   Plane, the character is represented as a 12-character sequence,
   encoding the UTF-16 surrogate pair.  So, for example, a string
   containing only the G clef character (U+1D11E) may be represented as
   "\uD834\uDD1E".

[*] https://tools.ietf.org/html/rfc7159#section-7


In GNU Emacs 26.0.50.2 (x86_64-unknown-linux-gnu, GTK+ Version 3.14.5)
 of 2016-10-24 built on caladan
Repository revision: 26ccd19269c040ad5960a7567aa5fc88f142c709
Windowing system distributor 'The X.Org Foundation', version 11.0.11604000
System Description:     Debian GNU/Linux 8.5 (jessie)

Configured using:
 'configure --with-xpm=no --with-jpeg=no --with-gif=no --with-tiff=no'

Configured features:
PNG SOUND DBUS GSETTINGS NOTIFY GNUTLS LIBXML2 FREETYPE XFT ZLIB
TOOLKIT_SCROLL_BARS GTK3 X11

Important settings:
  value of $LANG: C.UTF-8
  locale-coding-system: utf-8-unix



--- End Message ---
--- Begin Message --- Subject: Re: bug#24784: 26.0.50; JSON strings with utf-16 escape codes Date: Sun, 01 Jan 2017 12:26:07 +0000


Dmitry Gutov <address@hidden> schrieb am So., 1. Jan. 2017 um 01:45 Uhr:
On 31.12.2016 19:53, Philipp Stephani wrote:

> Agreed; converted to defun. I've only used defsubst because some other
> helper functions also used defsubst.

Thanks. Those others can probably be changed as well.

Yes, but rather not in this commit.
 

> No, the below case is more general and therefore has to come last.

Makes sense.

> It's not 100% related to the patch, but I think it can be included for
> symmetry reasons (testing encoding as well as decoding).

Of course. These are testing utf-8 encoding, though, right? It would be
better if you split them to a separate commit, I think.

OK, I've removed it from this patch and pushed it as 93be35e038.

--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]