On 24.09.2015 09:22, Graeme Geldenhuys wrote: > On 2015-09-24 09:09, Martin Schreiber wrote: >> It is an advantage to have pure ASCII files for such data. > > > Escaped text seems optional, but the UTF-8 encoding seem recommended. > Using non-escaped Unicode text is faster to parse and easier to read [by > a human] - and from my understanding of the RFC specs, less error prone. > > See also the important point about escaped text and UTF-16. > > βJSON documents can be encoded in UTF-8, UTF-16 or UTF-32, the default > encoding being UTF-8.[14] These encodings support the full Unicode > character set, including those characters outside the Basic Multilingual > Plane (U+10000 to U+10FFFF). However, if escaped those characters must > be written using UTF-16 surrogate pairs, a detail missed by some JSON > parsers. For example, to include the Emoji character U+1F602 π face > with tears of joy in JSON: > > { "face": "π" } > // or > { "face": "\uD83D\uDE02" } > β I did not miss it. ;-)
Martin _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal