[horde] How encoding works in horde?

Piotr Legiecki piotrlg at sci.pam.szczecin.pl
Fri Jun 6 06:39:36 UTC 2008


>> I'm having wrong characters, *but* what makes me wonder the other
>> characters put into database with phpmyadmin are ok (of course these
>> ones were wrongly displayed on the console before set names utf8)!?
> 
> That's right. It is supposed to be this way.

OK. So this is non intuitive behavior because the mysql is strange? Or 
horde? Or maybe php is not  doing good job with character encodings? I 
recall a mail where someone posted, that DB interface (pear::DB?) is ugly.

>> So finally at what encoding are the strings in the horde stored?
> 
> It's hard to explain in couple of sentences but if you really want to
> understand, you should look the internet for MySQL charset tutorial. Just
> set $conf['sql']['charset'] to the charset you need for your language, e.g.
> iso-8859-2 or utf-8 and you will be fine.

When you create database horde (using create.mysql.sql script) do you 
modify this script to set default encodings for this database or leave 
it alone (so it sets latin1 by default)?

Well, it is really mess. Even if my database is in latin1 I can see my 
national characters well and it just does not matter if horde is set to 
iso-8859-2 or utf-8.

So the simple solution is:

Deal with the encoding only on the horde side. don't touch apache, 
mysql, php. It should work well out of the box in horde and if you want 
to understand why phpmyadmin does not work well - google is your friend.

Regards
Piotr


More information about the horde mailing list