RE : [fpc-pascal] JSON and UTF8

2012-07-10 Thread Ludo Brands
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

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 perfectly

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

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 mark

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

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

[fpc-pascal] searching a programmer

2012-07-10 Thread P . Lüders
Hi All. I'm searching a programmer which is interested to develop further and serve my little CAD-system for civil engineering as home work. It's written in FPC with Win-API-calls. A small part, which runs still in a DOS window, must urgent be rewritten for Windows (Lazarus?). To get an overview,

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 : 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 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 things :-) Done.

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

2012-07-10 Thread Reinier Olislagers
On 10-7-2012 11:11, Michael Van Canneyt wrote: I reversed the argument default value to True. UTF8 is now the default. I'm very happy with this, thanks Michael! Regards, Reinier (looking forward to dumping my private copy of FPJSON) ___ fpc-pascal

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 : [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

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 will

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

2012-07-10 Thread Reinier Olislagers
On 11-7-2012 4:19, waldo kitty wrote: 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