WordPress.org

Forums

utf-8 encoding not actually set in browser (11 posts)

  1. the-me
    Member
    Posted 10 years ago #

    Hi,

    I have entries encoded in UTF-8, mostly with german umlauts. I have also set the under "options-reading-encoding" to utf-8 (and several other case spellings).

    The problem is that the browsers (IE and Firefox) do not switch encoding from latin1 to utf, and the umlauts are displayed as garbage, although in the page metadata the content-encoding type is set to "text/html;charset=utf-8". This is very strange.

    I also viewed other utf-8 test pages, and there this behavior does not occur, and in my current blog (from which I'd like to switch ;-) this does also not happen, although there is NO content/encoding html header sent at all.

    Manually setting the encoding to UTF-8 in the browser's encoding menu does display the text correctly, but a reload destroys this setting and re-establishes the "bad" state again.

    does anyone know more about this ... ?

  2. Mark (podz)
    Support Maven
    Posted 10 years ago #

    Character encoding
    * Add "AddDefaultCharset utf-8" to your .htaccess

    Does that help ?

  3. blueorder
    Member
    Posted 10 years ago #

    podz,

    It helped me :-)...I had been getting an encoding mismatch warning and now it's gone...thanks...

  4. the-me
    Member
    Posted 10 years ago #

    Yes, truly! That was a great hint. But I'm wondering why that seems to be necessary -- I mean, all the information about encodings should be present, even without that, shouldn't it? ... <not understanding/>

  5. Matt Mullenweg
    Troublemaker
    Posted 10 years ago #

    It's because of a mismatch in the meta tag and the actual HTTP headers sent by Apache. This is fixed in CVS.

  6. nickross
    Member
    Posted 10 years ago #

    Is there any way to fix this without having access to modify the .htaccess file?

  7. Lionheart
    Member
    Posted 10 years ago #

    Good, the htaccess did the trick. Thanx!

  8. Moony
    Member
    Posted 10 years ago #

    Well, in my case the .htaccess trick did not work. At least for FireFox (in IE everything seems to be OK). What else can I do? Please help!

    My blog: http://www.indostan.ru/blog/

  9. Mark (podz)
    Support Maven
    Posted 10 years ago #

    Using FF, I just had to switch the encoding manually in the browser: View > Character Encoding to utf-8 and I think it looks okay like that.

  10. Yngwin
    Member
    Posted 10 years ago #

    Character encoding should be specified in the server headers, then the browsers will pick it up automatically.

  11. chaaban
    Member
    Posted 9 years ago #

    Hello , i have the same prob , but its in arabic , evrything was working fine for me , except that i changed server and in the chaning some arabic word were messing evrything , even the rss feed was giving errors such as :

    An invalid character was found in text content. Error processing resource ...

    i tryed the utf-8 ...but i dont think its from this . does someone have any idea ?

    i tryed 2 export mysql database and still it give caracteres without any meaning or just squares instead of real caracteres .

    i hope someone will be able 2 help .

    Thank's alot .

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags