[fpc-pascal] code example where AnsiString used in FCL (SqlDB) causes data loss
Michael Van Canneyt
michael at freepascal.org
Wed May 11 15:10:46 CEST 2016
On Wed, 11 May 2016, Graeme Geldenhuys wrote:
> On 2016-05-11 13:37, Michael Van Canneyt wrote:
>>
>> It would not help if we did this: the data would be wrong in the TDataset
>> buffers, and the result would be worse.
>
> I didn't mean literally search and replace - that would simply be too
> easy. ;-) Some work and testing would be required, otherwise Delphi
> would have had Unicode support much sooner.
>
>
>> You just need to know what conversions happen where, and if you do it
>> works just fine.
>
> If anybody has the time, I would really like to learn how. Using FPC
> 3.x. Running the example program in a Latin-1 [console] environment and
> still get the correct data stored in the output.data file. I can't see a
> solution until SqlDB is changed.
There is none satisfactory.
As I said: TField.AsString is a problem, we are aware of it.
Michael.
More information about the fpc-pascal
mailing list