Character encoding problem

All about webserver configurations, PHP and databases.

Moderator: Thorsten

Post Reply
rkv
Posts: 3
Joined: Wed Oct 16, 2013 9:12 am

Character encoding problem

Post by rkv »

I recently installed phpmyfaq 2.8.2 on our web server running Apache/2.2.16 (Debian). Installation was quite straightforward and the pages work ok.
I created the Mysql database as instructed to use utf-8 character encoding and chose to use the finnish language pack for the pages.
Now, when I look at the front page, the accented characters (eg. äöå) are not shown correctly but instead shown as two characters like ä.
The web page received by the browser correctly states the page to use utf-8 encoding (by <meta charset="utf-8"> in the header), but for some reason my browsers (Firefox 24, Chromium) think that the encoding is windows-1252 (shown in FF: Tools - Page info) and displays the utf character with 2 symbols.
Also, trying to input accented characters via the admin interface is not working, the ä's are not entered at all into the database.

Any idea why? What configuration mistake did I do?
Thorsten
Posts: 15561
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Character encoding problem

Post by Thorsten »

Hi,

can you point me to your FAQ? Did you change the templates? On which platform did you installed phpMyFAQ?

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
rkv
Posts: 3
Joined: Wed Oct 16, 2013 9:12 am

Re: Character encoding problem

Post by rkv »

Hi, sorry for the delay, been busy with other...
the address is http://www.myrskyt.org/solar/phpmyfaq/
The platform is a hosted Debian linux running kernel Linux pp2rk 2.6.32-5-amd64 #1 SMP Fri May 10 08:43:19 UTC 2013 x86_64 GNU/Linux, Apache is of version 2.2.16 as told, Mysql is of version "mysql Ver 14.14 Distrib 5.1.66, for debian-linux-gnu (x86_64) using readline 6.1"
Thorsten
Posts: 15561
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Character encoding problem

Post by Thorsten »

Hi,

your Apache is mis-configured, it serves your code with the charset ISO-8859-1 although phpMyFAQ sends UTF-8. That breaks your umlauts.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
rkv
Posts: 3
Joined: Wed Oct 16, 2013 9:12 am

Re: Character encoding problem

Post by rkv »

I checked the settings, and that virtual server has indeed been configured with AddDefaultCharset ISO-8859-1 for some reason I just can't remember any more. Too obvious:), just did not pjump into my mind.
I have to change settings or move the faq to another virtual server, whicever is easier to do.

Thanks.
faris
Posts: 1
Joined: Tue Jan 21, 2014 6:37 am

Re: Character encoding problem

Post by faris »

Thanks for your reply. Do you have any suggestions as to what the code should be for the htaccess?

________________________________________
Chess-Rivals.com Play Online Live Chess Free 3d Against Computer
Last edited by faris on Tue Jan 26, 2016 8:22 am, edited 6 times in total.
Thorsten
Posts: 15561
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Character encoding problem

Post by Thorsten »

Hi,

it's straitgh forward: http://httpd.apache.org/docs/2.2/mod/co ... ultcharset

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
Post Reply