On Sat, 12 Aug 2017 17:56:58 -0300, "Marcos Douglas B. Santos via
Lazarus" <lazarus@lists.lazarus-ide.org> wrote:

>> Which one? Do you mean Windows CP-1252?
>But would it make any difference?

I recently had a problem with an application that was converted from
old string type to AnsiString and seemingly worked in the new Unicode
However, we received reports that it had failed in some Asian
countries (Korea, China, Thailand) and upon checking it turned out
that the data inside a string used as buffer was changed because of
locale differences....

After switching out the affected variable declarations from AnsiString
to RawByteString the application seemingly started to work again also
on these locations.

So AnsiString is not safe either....

And after this I have spent some time to totally rework the use of
strings as buffers to instead use TBytes. Lots of work but guaranteed
to not sneak in unexpected conversions.

Bo Berglund
Developer in Sweden

Lazarus mailing list

Reply via email to