Re: Best way to output astral characters
Leon Timmermans <[email protected]> Wed, 6 Sep 2017 08:12:45 +0200
| Newsgroups | gmane.text.yaml.general |
|---|---|
| Message-ID | <CAHhgV8i3rcf+5iXxrpNMviG9viV795YgmvgaWi5kOgHpAm62Sw@mail.gmail.com> |
On Wed, Sep 6, 2017 at 1:39 AM, Tech4Him via Yaml-core < [email protected]> wrote: > Hello! > > I am working on a cross-platform/cross-language program that uses YAML, > and some of our users have noticed that the way our JS YAML parser outputs > astral characters is not always recognized in YAML parsers in other > languages. What is the "offical" (and best) way to output astral characters > such as emojis in a way that all spec-compliant parsers should support? > > Thanks in advance, > Caleb > > In Him... I am complete (Col 2:9-10), confident that God will complete the > good work he started > (Phil 1:6), God's temple (1 Cor 3:16), more than a conqueror (Romans > 8:37), His child (Eph 1). > What are you doing? Javascript (and a few other languages with UTF-16 implementation details leaking out) has a tendency to treat such characters as two surrogates ("\uD83D\uDCA9"), instead of as a single character ("\U0001F4A9"). Quite frankly I think this is unhelpful and wrong, but JSON actually made it a standard -_-. Leon ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Yaml-core mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/yaml-core