[fpc-pascal] JSON and UTF8

waldo kitty wkitty42 at windstream.net
Wed Jul 11 04:19:08 CEST 2012


On 7/10/2012 07:00, Luiz Americo Pereira Camara wrote:
> 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 garbage.
>
> I would expect to work correctly in any enviroment

this means that some environments will end up with "garbage" for those UTF-8 
characters that cannot be translated back to the local codepage... i've been 
running headlong into this with another project and needing to convert from 
UTF-8 back to at least CP437... there are more than 255 characters in UTF-8 and 
there's no way i know of to translate them all back to 255 characters... even 
with trying to use multiples like ae for æ ( alt-145 in CP437 i think realizing 
that this editor can do whatever it wants to :/ )... the doublet and the 
character i typed the ones i was thinking of for this example, though...



More information about the fpc-pascal mailing list