Hi,
I have problems with German Umlaute (ÄÖÜß).
My environment: D7, ZEOS 6.5.1 alpha CVS as of 23/09/2005 and mySQL 4.1.13.
I understand that I can add a codepage to the TZconnection's properties, like ZConnection.Properties.Add ('Codepage=ISO8859_1');
As far as I know my db-server has no ISO8859_1 installed. Instead I can chose between codespages like latin1, utf8, cp1250 and many others.
If I tried almost every suitable codepage in the ZConnection.Properties, but the result is always the same: I can see the CORRECT characters in the database using phpMyAdmin/Confixx or mySQL Administrator.
But I get junk characters while accessing the database via Delphi/ZEOS.
Can anybody please help me?
Thanks!
Ingmar
German Umlaute
Moderators: gto, cipto_kh, EgonHugeist
I can write how it works in MSEgui:
Strings are converted from the current locale encoding or utf8 (if tmsesqlquery.controller.options dso_utf8 is set) to UCS2 at data fetching and back to the current locale encoding or utf8 at posting to the database.
All strings in MSEgui are UCS2 encoded. So if your database encoding is utf8, you can transparently use the characters of the BMP (Basic Multilingual Plane), they will be displayed correct if the used font has glyphs for them. Right to left scripts are not implemented yet.
This approach works with ZeosLib too. Because ZeosLib does not store strings in UCS2, the conversion must be done by every field data access. It is slower than the native MSEgui DB components.
The screenshot below is with an utf8 MySQL DB and tmsezquery.
Martin
Strings are converted from the current locale encoding or utf8 (if tmsesqlquery.controller.options dso_utf8 is set) to UCS2 at data fetching and back to the current locale encoding or utf8 at posting to the database.
All strings in MSEgui are UCS2 encoded. So if your database encoding is utf8, you can transparently use the characters of the BMP (Basic Multilingual Plane), they will be displayed correct if the used font has glyphs for them. Right to left scripts are not implemented yet.
This approach works with ZeosLib too. Because ZeosLib does not store strings in UCS2, the conversion must be done by every field data access. It is slower than the native MSEgui DB components.
The screenshot below is with an utf8 MySQL DB and tmsezquery.
Martin
Still the same problem with 6.6.2 RC
Hi,
I have exactly the same problem as described above.
Using phpMyAdmin or MySQL-Clients like HeidiSQL, I can see the correct German umlauts in the tables, stored in utf8.
When I connect to the DB by the zeos components, all Umlauts are displayed wrong, for ex. Fußball = Fußball
I found the hint setting the ZConnection.propoerties to "Codepage=utf8" (and many others), but this does not change anything.
Any solutions for this problem?
Thank you!
Heiko
I have exactly the same problem as described above.
Using phpMyAdmin or MySQL-Clients like HeidiSQL, I can see the correct German umlauts in the tables, stored in utf8.
When I connect to the DB by the zeos components, all Umlauts are displayed wrong, for ex. Fußball = Fußball
I found the hint setting the ZConnection.propoerties to "Codepage=utf8" (and many others), but this does not change anything.
Any solutions for this problem?
Thank you!
Heiko
Hi Mark, thanks for the immediate answer.
I started to check the HeidiSQL sourcecodes, but this is without end. They are using some other components and - as you said - they seem to have changed parts of the code.
(http://heidisql.svn.sourceforge.net/vie ... s/zeosdbo/ )
I am really upset about the problems with utf8. Is it really true that Zeos under Delphi 6 prof. that I'm using is not able to deal with utf8?
Thank you for your help!
Heiko.
I started to check the HeidiSQL sourcecodes, but this is without end. They are using some other components and - as you said - they seem to have changed parts of the code.
(http://heidisql.svn.sourceforge.net/vie ... s/zeosdbo/ )
I am really upset about the problems with utf8. Is it really true that Zeos under Delphi 6 prof. that I'm using is not able to deal with utf8?
Thank you for your help!
Heiko.
UPDATE - problem solved.
Well... I think it was not a problem at all. The wrong umlauts only appeared when I connected to my local DB-server. So either I did a mistakte importing the data to the local server or I have to check the config of the server.
Using the properly configured (utf8) production server, everything is fine.
Thanks for your efforts, Mark!
Heiko.
Well... I think it was not a problem at all. The wrong umlauts only appeared when I connected to my local DB-server. So either I did a mistakte importing the data to the local server or I have to check the config of the server.
Using the properly configured (utf8) production server, everything is fine.
Thanks for your efforts, Mark!
Heiko.