Re: RE : [fpc-pascal] JSON and UTF8

2012-07-11 Thread Luiz Americo Pereira Camara
Em 10/7/2012 23:19, waldo kitty escreveu: 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 enviro

Re: RE : [fpc-pascal] JSON and UTF8

2012-07-10 Thread waldo kitty
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 wil

Re: RE : [fpc-pascal] JSON and UTF8

2012-07-10 Thread Luiz Americo Pereira Camara
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 UseUTF

Re: RE : [fpc-pascal] JSON and UTF8

2012-07-10 Thread Luiz Americo Pereira Camara
Em 10/7/2012 04:32, Ludo Brands escreveu: 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,

Re: RE : RE : RE : RE : [fpc-pascal] JSON and UTF8

2012-07-10 Thread Marco van de Voort
In our previous episode, Michael Van Canneyt said: > >> > >> http://wiki.freepascal.org/index.php?title=User_Changes_Trunk > >> > >> to notify people of this change. > > > > Could you change it to use the same format/template as the other entries? > > We can always trust Jonas to notice such thing

Re: RE : RE : RE : RE : [fpc-pascal] JSON and UTF8

2012-07-10 Thread Michael Van Canneyt
On Tue, 10 Jul 2012, Jonas Maebe wrote: On 10 Jul 2012, at 11:40, Michael Van Canneyt wrote: I have added a section to http://wiki.freepascal.org/index.php?title=User_Changes_Trunk to notify people of this change. Could you change it to use the same format/template as the other entries?

Re: RE : RE : RE : RE : [fpc-pascal] JSON and UTF8

2012-07-10 Thread Jonas Maebe
On 10 Jul 2012, at 11:40, Michael Van Canneyt wrote: > I have added a section to > > http://wiki.freepascal.org/index.php?title=User_Changes_Trunk > > to notify people of this change. Could you change it to use the same format/template as the other entries? Jonas

Re: RE : RE : RE : RE : [fpc-pascal] JSON and UTF8

2012-07-10 Thread Michael Van Canneyt
On Tue, 10 Jul 2012, Ludo Brands wrote: Nothing is unthinkable. The other constructs are very ugly. I reversed the argument default value to True. UTF8 is now the default. A very wise decision;) I must be getting older :) Seriously: when json support was written, Unicode/UTF8 support

RE : RE : RE : RE : [fpc-pascal] JSON and UTF8

2012-07-10 Thread Ludo Brands
> Nothing is unthinkable. The other constructs are very ugly. > > I reversed the argument default value to True. UTF8 is now > the default. > A very wise decision;) Ludo ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freep

Re: RE : RE : RE : [fpc-pascal] JSON and UTF8

2012-07-10 Thread Michael Van Canneyt
On Tue, 10 Jul 2012, Ludo Brands wrote: So you'd reverse the constructor boolean argument to specify Utf8 as default, and let the user choose the old behaviour if he needs it ? If that is "unthinkable" then define new contructors TJSONParser.Create2(...,AUseUTF8 : Boolean = True) or Create2(

RE : RE : RE : [fpc-pascal] JSON and UTF8

2012-07-10 Thread Ludo Brands
> So you'd reverse the constructor boolean argument to specify > Utf8 as default, > and let the user choose the old behaviour if he needs it ? > If that is "unthinkable" then define new contructors TJSONParser.Create2(...,AUseUTF8 : Boolean = True) or Create2(...,AUseUTF8 : Boolean = True) and m

Re: RE : RE : [fpc-pascal] JSON and UTF8

2012-07-10 Thread Michael Van Canneyt
On Tue, 10 Jul 2012, Ludo Brands wrote: Because the old behaviour is not "buggy". It simply did not support Unicode, and does the next best thing, in casu: it transforms to the system codepage. A car without ABS and SAT-Nav is not buggy. It just doesn't support features which are nowadays ca

RE : RE : [fpc-pascal] JSON and UTF8

2012-07-10 Thread Ludo Brands
> Because the old behaviour is not "buggy". > > It simply did not support Unicode, and does the next best thing, > in casu: it transforms to the system codepage. > > A car without ABS and SAT-Nav is not buggy. > It just doesn't support features which are nowadays called > standard. You can per

Re: RE : [fpc-pascal] JSON and UTF8

2012-07-10 Thread Michael Van Canneyt
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,