* bug#17133: json-encode-string incorrectly encodes extra-BMP characters
@ 2014-03-28 22:22 Nathan Trapuzzano
2015-10-04 15:55 ` Simen Heggestøyl
0 siblings, 1 reply; 2+ messages in thread
From: Nathan Trapuzzano @ 2014-03-28 22:22 UTC (permalink / raw)
To: 17133
M-: (princ (json-encode "\U0001d11e"))
==> "\u1d11e" ;; should be "\ud834\udd1e" or "𝄞"
From ECMA-404:
To escape a code point that is not in the Basic Multilingual Plane,
the character is represented as a twelve-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".
^ permalink raw reply [flat|nested] 2+ messages in thread
* bug#17133: json-encode-string incorrectly encodes extra-BMP characters
2014-03-28 22:22 bug#17133: json-encode-string incorrectly encodes extra-BMP characters Nathan Trapuzzano
@ 2015-10-04 15:55 ` Simen Heggestøyl
0 siblings, 0 replies; 2+ messages in thread
From: Simen Heggestøyl @ 2015-10-04 15:55 UTC (permalink / raw)
To: Nathan Trapuzzano; +Cc: 17133-done, dgutov
Nathan Trapuzzano <nbtrap@nbtrap.com> writes:
> M-: (princ (json-encode "\U0001d11e"))
> ==> "\u1d11e" ;; should be "\ud834\udd1e" or "𝄞"
>
>>From ECMA-404:
>
> To escape a code point that is not in the Basic Multilingual Plane,
> the character is represented as a twelve-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".
This seems to be working as expected in master now; (json-encode
"\U0001d11e") produces "𝄞" as described.
-- Simen
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-10-04 15:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-28 22:22 bug#17133: json-encode-string incorrectly encodes extra-BMP characters Nathan Trapuzzano
2015-10-04 15:55 ` Simen Heggestøyl
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.