[horde] Problem with UTF-8-Charsets
Vilius Šumskas
vilius at lnk.lt
Wed Mar 12 13:43:05 UTC 2008
> Hello,
>
> I've searched on google and the list-archive for a while but found no
> solutions for my problem:
>
> 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,
> but in mysql (via phpMyAdmin) I have only the 8-bit-representation of
> the unicode-chars (like "Standardidentität"):
>
> - $conf['sql']['charset'] = 'utf-8';
> - in mysql the database, all tables and all text-columns have the
> collation utf_general_ci.
<snip>
> I hope it is easy to correct this and I only had "tomatoes on my
> eyes" (like we say in german language...)
>
> Christoph Mühlmann
Someone will correct me if I'm wrong but Horde doesn't really support UTF-8 (or any other charset) *at database level*. The main problem is that Horde uses PEAR::DB driver which doesn't have such functionality. Instead data are stored as ANSI and then converted by Horde's String::convertCharset for the required page encoding (even if your mysql databases ant tables are set to utf_general_ci). In short, Horde doesn't do queries like "SET NAMES 'utf8'" or similar after connection to database.
There are couple of Horde apps that support PEAR::MDB2, the better and more advanced version of PEAR::DB, but most of the stable ones (the ones that go into Groupware suite) still are on old PEAR::DB.
If you really want UTF8 in your database then hack PEAR::DB library by putting mysql_query("SET NAMES 'utf8'); after connect call.
--
Best Regards,
Vilius Šumskas
LNK TV IT manager
mob.: +370 614 75713
http://www.lnk.lt
More information about the horde
mailing list