German Umlaute

Forum related to MySQL

Moderators: gto, cipto_kh, EgonHugeist

Post Reply
Ingmar
Fresh Boarder
Fresh Boarder
Posts: 5
Joined: 08.09.2006, 14:16

German Umlaute

Post 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
olgerdviz
Fresh Boarder
Fresh Boarder
Posts: 1
Joined: 21.09.2007, 14:11

Post by olgerdviz »

I have the same problem. does anybody have a solution or advice?
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post 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.
mse
Junior Boarder
Junior Boarder
Posts: 41
Joined: 17.07.2007, 06:30

Post 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
baurat
Fresh Boarder
Fresh Boarder
Posts: 10
Joined: 17.04.2006, 16:53

Still the same problem with 6.6.2 RC

Post 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
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post 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
Image
baurat
Fresh Boarder
Fresh Boarder
Posts: 10
Joined: 17.04.2006, 16:53

Post 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.
baurat
Fresh Boarder
Fresh Boarder
Posts: 10
Joined: 17.04.2006, 16:53

Post 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.
Post Reply