Page 1 of 1

German Umlaute

Posted: 13.09.2006, 09:28
by Ingmar
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

Posted: 21.09.2007, 14:13
by olgerdviz
I have the same problem. does anybody have a solution or advice?

Posted: 21.09.2007, 21:06
by mdaems
Well,... First upgrade to the newest Zeoslib version. I don't promise it works, but it's a good start to make sure it's not one or other old bug that's fixed already.

Somebody else who has some experience with Umlaute? Let us know if they need special treatment.

Posted: 22.09.2007, 09:06
by mse
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

Image

Still the same problem with 6.6.2 RC

Posted: 06.01.2008, 19:26
by baurat
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

Posted: 06.01.2008, 20:26
by mdaems
Strange. HeidiSQL is based on zeoslib components. They have modified zeoslib, however.
Maybe a bad hint, but you could try their zeoslib version to check if it's better with umlauts. Or check their code to see what trick they use.

Mark

Posted: 06.01.2008, 21:45
by baurat
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.

Posted: 06.01.2008, 22:20
by baurat
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.