Page 1 of 1

Problem with UTF8 and sidebar plugins

Posted: Thu Jun 08, 2006 10:28 pm
by Karotte
Hi,

I switched to UTF8 today, and everything works fine, except for sidebar plugins. It seems I'm unable to enter UTF8 in the sidebar plugin configuration, for example the titles at http://blog.karotte.org/ in the sidebar are wrong. It displays:

Aktuelle Eintr?ge

instead of

Aktuelle Einträge

any ideas?

The whole database was dumped in UTF8 and reimported in an utf8 database, so the entries display just fine. My only problem (so far) are the sidebar plugins.

Posted: Thu Jun 08, 2006 11:29 pm
by Karotte
I found it: the SET NAMES is set after the config table is loaded.. we need to load the configuration again after it is known that we want UTF8.

I did a "hotfix" for this, I added an serendipity_config_reload function which will reload the whole configuration and added a check in the serendipity_config.inc.php which checks for UTF8 and reloads the config after reconnecting to the database with SET NAMES utf8:

http://www.karotte.org/directories/s9y_config_utf8.diff

Any better ideas?

Posted: Fri Jun 09, 2006 11:34 am
by garvinhicking
I've committed a different fix to 1.1 SVN. There a new dbCharset option is stored in the local configuration, properly issuing the charset for each new connection.

I'd like feedback about this pretty much *g*

HTH,
Garvin

Posted: Fri Jun 09, 2006 12:37 pm
by Karotte
Yeah, that works. My bugfix is obsolete with the new 1.1 SVN version out. :) I'll testdrive it and see if there are any more errors.