Newsgroups : Borland : borland.public.delphi.rtl.win32 : 2007 Jan : Different locale settings change the field's value.

www.cryer.info
Managed Newsgroup Archive

Different locale settings change the field's value.

Subject:Different locale settings change the field's value.
Posted by:"m. Th." (theologos@vatopedi.gr_nospam)
Date:Mon, 15 Jan 2007 17:27:07

Hi,

I have the following line in a component (kbmMemTable, for conformity):

ADataSet.Fields[j].AsString := Reader.ReadString;

Where, in this case, Fields[j] is a TGraphicField and Reader.ReadString reads, in fact, a JPEG file. In the component exists a similar code for
writing the field in a stream/file.

If I do the save/load process on the same locale everything is fine. But if I try to load the file on another locale (let's say save on 'Greek' and
load on 'German') then the Field has wrong info inside. I tried SetThreadLocale(1032) (which is 'Greek') and this worked on Delphi 7 with Windows XP
SP1. Now I have BDS 2006 with WinXP SP2 and doesn't work anymore (IOW, the above command it seems to not have effect). Can you help me?

TIA,

m. Th.

Replies:

www.cryer.info
Managed Newsgroup Archive