[horde] Problem with UTF-8-Charsets

Christoph Mühlmann christoph at nagnag.de
Wed Mar 12 16:48:32 UTC 2008


Hello,

Am Mittwoch, den 12.03.2008, 16:54 +0100 schrieb Otto Stolz:
> Hello Christoph Mühlmann,
> 
> you have written:
> > I am trying to configure a horde-installation on a server running Debian
> > to use utf-8 within horde and its applications on one side and mysql on
> > the other side. But when i I configure my installation in the way I did
> > it, I will have correct umlauts or russian chars within the horde-apps,
> 
> This is what you are aiming at, isn’t it?

yes, I need german and russian chars at the moment, and perhaps others
(like chinese) in the future.

> > but in mysql (via phpMyAdmin) I have only the 8-bit-representation of
> > the unicode-chars (like "Standardidentität"):
> 
> Someone will correct me if I’m wrong but this *is* UTF-8 -- just displayed
> with the wrong terminal emulator. If you want to see the characters stored
> in your database, you’ll have to use a tool capable of displaying them as
> intended, i. e., capable of interpreting the encoding applied.
> 
> Try, e. g., the mlterm terminal emulator to display the strings from
> your database. (But I cannot say more, as I actually haven’t tried that
> emulator, personally.)

no, it's not a problem of displaying them, the terminals I use are
capable of utf-8 and they are displaying other texts correctly. It is
definitely an issue how data is stored in the database.

> Or login as a Horde administrator, then use the menu item “Administration”/
> “SQL Shell” (from the side-bar menu) to query your MySQL data base. I have
> just put a polytonic-Greek nickname into the addressbook of my test account,
> then executed the SQL statement:
>    select object_name, object_alias
>    from turba_objects
>    where owner_id='Hugine.Habicht at uni-konstanz.de';
> and behold! there was the nickname, perfectly readable, in the
> object_alias column.

of course this works, but it is not correct: 

if horde wirtes text-data to the database and reads it back with the
same conversation methods (wich are depending on the connection but are
the same) you will have an "Ä" converted to "ä" in the database and
converted back on reading to "Ä":

Because the transfer between horde and mysql is not in utf-8 (see the
mail from Vilius Šumskas) but in iso-8859-1 the "Ä" (utf-8) is seen as
"ä" (iso-8859-1) at transfer-time and written as "ä" (utf-8) in the
Database (and same way back for reading the database). If the transfer
would be in utf-8 (like phpMyAdmin does it correctly), everything would
be ok. 

The hack, wich was suggested to me by Vilius, works great for me.

thanks for your response,

Christoph Mühlmann



More information about the horde mailing list