[fpc-pascal] JSON and UTF8

Luiz Americo Pereira Camara luizmed at oi.com.br
Tue Jul 10 13:00:23 CEST 2012

Em 10/7/2012 04:59, Michael Van Canneyt escreveu:
> On Tue, 10 Jul 2012, Ludo Brands wrote:
>>> Following up on bug 22310 http://bugs.freepascal.org/view.php?id=22310
>>> I enabled the use of UTF8 in the FPC JSON support.
>>> The constructors of the JSON parser/scanner now accept an
>>> extra argument
>>> UseUTF8 which tells them to convert JSON strings to UTF8, not
>>> the system codepage.
>> I don't understand why you want to keep buggy behavior for backwards
>> compatibility.
> Because the old behaviour is not "buggy".


With the old behavior, in an system with a system code page <>  UTF8,  
if i try to show the parsed value of "\u4E01" in e.g. a LCL app will get 

I would expect to work correctly in any enviroment


More information about the fpc-pascal mailing list