Take the 2-minute tour ×

I work on a website that has different language interfaces, so far I use english and german.

when the german text is loaded, it shows weird characters like the following screenshot

enter image description here

though I use


and also in the html header


what else can I do to solve it ?


share|improve this question
You've shown what you're using for output encoding - but you haven't told us anything about how you're loading the text in the first place. I strongly suspect that that's the problem. –  Jon Skeet Dec 6 '12 at 15:08
...and NINE questions, none of them accepted, a 0% accept rate is shameful. –  Diodeus Dec 6 '12 at 15:09
I have 12 reputation, which doesnt give me the right to accept answers, what should I do about that ? –  Digital fortress Dec 6 '12 at 15:13
Go into your profile, find your questions and accept some answers. –  Diodeus Dec 6 '12 at 15:25
whenever i try to, a popup tells me that i should have 15 reputation to accept answers!!! –  Digital fortress Dec 6 '12 at 15:33
add comment

2 Answers

up vote 2 down vote accepted

The content of the page needs to also be in UTF-8. Your content was probably made using MS Word, which uses Windows 1251 encoding. You need to re-save your document as UTF-8.

UTF-8 does not convert formats for you.

share|improve this answer
some of the content comes from csv files, does those get saved in any specific encoding ? –  Digital fortress Dec 6 '12 at 15:19
Yes, they probably came from Excel or MS Access, both of which have a "save as UTF-8" option in the 2010 version. You will need to re-save these documents. –  Diodeus Dec 6 '12 at 15:21
okay I get it now, thanks a lot, when I get enough reputation I promise to accept this answer :) –  Digital fortress Dec 6 '12 at 15:23
add comment

If those strings are saved in a file, the file has to be encoded in UTF-8 too. If you're getting them from a database, they'll have to be stored as UTF-8 and you'll have to set the connection charset to utf-8.

You could also check whether your text is UTF-8 and if not, convert it with utf8_encode.

share|improve this answer
Thanks for your answer, i'll keep utf8_encode in mind –  Digital fortress Dec 6 '12 at 15:30
add comment

Your Answer


