[fpc-pascal] Resourcestrings in FPC 3.0
Martin Schreiber
mse00000 at gmail.com
Thu Sep 24 09:33:25 CEST 2015
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
More information about the fpc-pascal
mailing list