Problem with UTF8 and sidebar plugins

Found a bug? Tell us!!
Post Reply
Karotte
Regular
Posts: 8
Joined: Tue Jun 14, 2005 11:48 pm

Problem with UTF8 and sidebar plugins

Post 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.
Karotte
Regular
Posts: 8
Joined: Tue Jun 14, 2005 11:48 pm

Post 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?
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Karotte
Regular
Posts: 8
Joined: Tue Jun 14, 2005 11:48 pm

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