[fpc-pascal] RTL and Unicode Strings

Graeme Geldenhuys mailinglists at geldenhuys.co.uk
Wed May 11 13:17:37 CEST 2016


On 2016-05-11 10:43, Marco van de Voort wrote:
>> The problem as I see it, is that I already lost data when SqlDB
>> converted it to Latin-1. Am I not understanding the problem?
> 
> It depends. Sqldb assigned non ansistring data to an ansistring. In the old
> (2.6.4, old delphi) logic it would simply move without conversion, and you
> would obtain an ansistring with utf8 in it and be converting forever.

Correct, and because 2.6.4 did no conversions I can accurately assume in
my application that an AnsiString contains UTF-8 encoded data, and work
with it appropriately. This is how fpGUI and LCL has been working for
many years.

But now with 3.0.0, auto-conversion occurs inside the RTL and FCL code,
corrupting the data before I can get to it.

That's a massive difference between 2.6.4 and 3.x
As it stands now, I cannot see how anybody can actually switch to FPC
3.0 - it simply isn't ready to be used.


Regards,
  Graeme

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

My public PGP key:  http://tinyurl.com/graeme-pgp



More information about the fpc-pascal mailing list