Page 1 of 1

Forced Unicode

Posted: Tue Jul 14, 2009 10:53 am
by hmesker
Since I upgraded to the latest version of Serendipity my weblog (http://www.i-tjingcentrum.nl/serendipity/) is always displayed in Unicode, which produces � characters at certain places. I thought I could resolve this by hardcoding 'charset=ISO-8859-1' in the template header, but that doesn't help: Firefox and IE still choose Unicode as character set, and I have to manually switch to 'Western'. What should I do to change this? Is it a browser problem or a weblog problem?

Harmen.

Re: Forced Unicode

Posted: Tue Jul 14, 2009 11:46 am
by garvinhicking
Hi!

Check your s9y configuration and make sure that the language is set to "Native" and not "UTF-8". Also it might help, if you set the option "Use database charsets" to the value that is currently NOT selected (flip it).

HTH,
Garvin

Re: Forced Unicode

Posted: Wed Jul 15, 2009 12:45 pm
by hmesker
Hi Garvin,

Thanks for your help, but I accidentally found the solution - not in the options you described (they were set okay), but in the language files. The Dutch language file had UTF-8 as encoding, while the English and other languages had Western encoding. When I changed the Dutch language's encoding the strange markings disappeared.

I wonder why the Dutch file has UTF-8, while they other languages use Western encoding.

Re: Forced Unicode

Posted: Wed Jul 15, 2009 2:12 pm
by garvinhicking
Hi!

Yes, indeed the s9y file for dutch only exists in a UTF-8 variant. The original translator mentioned there were problems in ISO-8859-1 where certain characters were not available, so we never offered a "western encoding".

You could fix this by encoding your file locally as ISO-8859-1 and changing SQL_CHARSET an dLANG_CHARSET, but we can't at this point do this generally because users that already use dutch, are already using UTF-8.

I assume you only switched to dutch recently and previously had english or so?! Nowadays, the best recommendable charset is UTF-8 (also default for new s9y installations) to prevent encoding issues like these...

Regards,
Garvin

Re: Forced Unicode

Posted: Thu Jul 16, 2009 9:41 am
by hmesker
garvinhicking wrote:You could fix this by encoding your file locally as ISO-8859-1 and changing SQL_CHARSET an dLANG_CHARSET, but we can't at this point do this generally because users that already use dutch, are already using UTF-8.
I only changed the dLANG_CHARSET, not the SQL_CHARSET. Should I change that also? It all looks fine to me now.
I assume you only switched to dutch recently and previously had english or so?!
Well, no, it always automatically chooses Dutch, which is fine.
Nowadays, the best recommendable charset is UTF-8 (also default for new s9y installations) to prevent encoding issues like these...
I know, but I can't change that in the preferences withou messing up the text of all the entries, can I?

But it seems to be okay now, If I don't see anymore glitches I'll just leave it as it is.

I like the way Serendipity handles Chinese characters: by using 王配 type of codes. Whatever the selected encoding, the characters always show up right! Brilliant!

Best,

Harmen.