[fpc-pascal] JSON and UTF8

Michael Van Canneyt michael at freepascal.org
Tue Jul 10 11:11:58 CEST 2012



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(...,AUseUTF8 :
> Boolean = True) and mark the Create(...) as deprecated. Or deprecate
> TJSONParser and make it a descendant of TJSONParser2 that has
> Create(...,AUseUTF8 : Boolean = True) constructors.

Nothing is unthinkable. The other constructs are very ugly.

I reversed the argument default value to True. UTF8 is now the default.

Michael.



More information about the fpc-pascal mailing list