[Lazarus] [fpc-pascal] Tests results of several pascal based JSON parsers

Bart bartjunk64 at gmail.com
Sat Aug 31 13:25:33 CEST 2019


On Fri, Aug 30, 2019 at 11:02 PM Michael Van Canneyt via lazarus
<lazarus at lists.lazarus-ide.org> wrote:

> Can you try setting defaultsystemcodepage to UTF8 ?

Feeling a little bit embarrassed now (I'm used to Lazarus which
defaults to that).
With DefaultSystemCodePage := CP_UTF8 it works:

Handles unicode chars correctly: >{ "name": "Joe®Schmoe",
"occupation": "bank teller \u00Ae " }<
Name    : 004A 006F 0065 00AE 0053 0063 0068 006D 006F 0065 [Joe®Schmoe]
Expected: 004A 006F 0065 00AE 0053 0063 0068 006D 006F 0065 [Joe®Schmoe]
Occupation: 0062 0061 006E 006B 0020 0074 0065 006C 006C 0065 0072
0020 00AE 0020 [bank teller ® ]
Expected: 0062 0061 006E 006B 0020 0074 0065 006C 006C 0065 0072 0020
00AE 0020 [bank teller ® ]
TRUE

-- 
Bart


More information about the lazarus mailing list