Problems with special character e.g. ä (Bugs)

by Auge ⌂ @, Friday, March 02, 2018, 09:52 (172 days ago) @ Milo


But that was all the time a bit crude for me. We use UTF-8 and then we set the locale charset to ISO-8859-*?

Okay, what's happens, if you change the locale_charset in your installation?

To tell the truth, I never tried that (and actually I can't, I am at work).

If I change it to UTF-8 at derletztekick.com, the date is not shown.


What's the benefit of locale_charset in the script, especially when it's value is not UTF-8 which is in use everywhere else in the scripts?

I don't know, sorry. The intention to set it to ISO... or UTF is somewhat educated guessing. ;-)


In the index.php #55 ff. the program defines two constants. One is CHARSET and the second is LOCALE_CHARSET and will only gets defined, if $lang['locale_charset'] is different from $lang['charset']. That's the case in the german language file (line #8 ff.). In the function format_time in functions.inc.php a time/date string get's normally formatted with strftime or with iconv in the case of the existence of constant LOCALE_CHARSET. In the latter case iconv converts the time string from LOCALE_CHARSET to CHARSET. That is in our case a conversion from ISO-8859-1 to UTF-8.

But when I'm right, the time/date is provided with the charset UTF-8 from the beginning on ("ä" is a mismatching presentation of the UTF-8-codepoints for "ä" in Latin1 (ISO-8859-1)). So the string get's doubled encoded in UTF-8.

Tschö, Auge

Trenne niemals Müll, denn er hat nur eine Silbe!

Complete thread:

 RSS Feed of thread

powered by my little forum