Re: 16-bit character-escaped surrogates and JSON compatibility
Oren Ben-Kiki <[email protected]>
| Newsgroups | gmane.text.yaml.general |
|---|---|
| Message-ID | <CADJiDhsAPrJPv4dqA7pt8SsP0bJ3gNNJDSASwdnVA2iWY=3zkw@mail.gmail.com> |
Sigh. "There's always one more thing". YAML provides \U<32 bits> as well as \u<16-bits>. I guess we must explicitly allow for a pair of \u<16-bits> that encode a 32-bit character to be JSON compliant. Nice catch, thanks! Oren Ben-Kiki On Wed, Jul 16, 2014 at 7:04 PM, Peter Occil <[email protected]> wrote: > (Resending. I suspect it didn’t go through because I wasn’t subscribed > yet when I sent it.) > > This is an issue concerning the YAML 1.2 specification < > http://yaml.org/spec/1.2/spec.html>. > > This specification is intended to ensure JSON compatibility. But one > thing about JSON was left silent: the behavior of character-escaped > surrogate code points ("\uXXXX"). According to RFC 7159, the latest JSON > specification, a pair of character-escaped surrogate code points is > converted to a supplementary code point under the UTF-16 rules (see the > last paragraph in section 7, Strings, in RFC 7159), while this is not > mentioned at all in YAML 1.2. For JSON compatibility, this behavior ought > to be used in the YAML specification. > --Peter > > > ------------------------------------------------------------------------------ > Want fast and easy access to all the code in your enterprise? Index and > search up to 200,000 lines of code with a free copy of Black Duck > Code Sight - the same software that powers the world's largest code > search on Ohloh, the Black Duck Open Hub! Try it now. > http://p.sf.net/sfu/bds > _______________________________________________ > Yaml-core mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/yaml-core > > ------------------------------------------------------------------------------ Want fast and easy access to all the code in your enterprise? Index and search up to 200,000 lines of code with a free copy of Black Duck Code Sight - the same software that powers the world's largest code search on Ohloh, the Black Duck Open Hub! Try it now. http://p.sf.net/sfu/bds _______________________________________________ Yaml-core mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/yaml-core