Lazarus 1.2.2 + ZeosLIB 7.1.3 + MS SQL 2008 r2 Unicode Hell

The official tester's forum for ZeosLib 7.1. Ask for help, post proposals or solutions.
Post Reply
robert83a1
Fresh Boarder
Fresh Boarder
Posts: 2
Joined: 21.05.2014, 19:36

Lazarus 1.2.2 + ZeosLIB 7.1.3 + MS SQL 2008 r2 Unicode Hell

Post by robert83a1 »

Hello everyone,

I know Lazarus itself is UTF8 and ZeosLIB to is UTF8 , my first problem was I was loosing characters when sending to sql for example
čćšđ would become ccsd .
Controls codepage for ZeosLIB was CCP_UTF8 , with autoencodestring turned on. Then I've tried to used CCP_UTF16 (which is as far as I understood
Unicode, or is supposed to be ) , but it still did not work, I've got ? marks.

So I finally found the solution by mistake :

cGET_ACP ( I read somewhere it's ANSI ) , and AutoEncodeString is turned OFF . Now in Lazarus I see characters displaying normally , and even my queries work, and stored procedures don't complain. But in SQL the names display strangely ( I can live with it , if it won't be a bigger problem later )

For example :
Bad Wünnenberg - Bad Wünnenberg
Gütersloh - Gütersloh
Hövelhof - Hövelhof

I only plan to use Lazarus with this SQL database nothing else , I am planning to try it out from a Windows 2000 professional maschine , to see if the characters are displayed correctly.... then from a Hungarian Windows XP machine as well. On Windows 7 all is fine.

Any ideas for possible dangers I might be facing in the future because of this? Any way around this ? I've tried UTF16 without conversion, then in SQL the characters displayed correctly... but then in my program I did not see anything at all...

Greetings
Robert

UPDATE 08:21 20.05.2014
I did try it under Windows XP Professional, it to is Unicode and plain English it was (my Win7 is german) . I've went around characters displayed correctly...I've added a few
new MileageLog's they to were with Unicode characters..and it displays correctly on both WinXP and Windows 7 , so I guess, I can be safe as far as I use Lazarus + ZeosLIB... probably I would have a hell of a time if I would try to view this from Delphi...
Post Reply