[fpc-pascal] code example where AnsiString used in FCL (SqlDB) causes data loss

Graeme Geldenhuys mailinglists at geldenhuys.co.uk
Wed May 11 15:24:12 CEST 2016


On 2016-05-11 14:14, Jonas Maebe wrote:
> compared to FPC 2.6.x due to automatic conversions in the RTL and FCL.  
> When it is clear that is not true, you are now saying that the  
> behaviour of FPC 3.0 is different to FPC 2.6.x if you compile  
> different code with each one.

My test program under FPC 2.6.4 doesn't give problems. It's when that
same program is compiled under FPC 3.0.0 that it does. All due to String
(and thus AnsiString) changing its encoding based on the running
environment. With FPC 2.6.4 compiled programs, no matter the environment
(UTF-8 or Latin-1), my test program behaves the same.

I give up!

Regards,
  Graeme




More information about the fpc-pascal mailing list