Support » Themes and Templates » Swedish letter problem

  • matsb

    (@matsb)


    Hello!
    Since I began to use 1.5 my swedish letter look funny in browsers like NetNewsWire. It looks ok in the browser, however. Is there a bugg or have I done something wrong?
    Could someone please help me? (Sorry for my bad english, I am from Sweden, he-he).

Viewing 5 replies - 1 through 5 (of 5 total)
  • Lorelle

    (@lorelle)

    Do you have the language codes set right in the doctype? It should feature a two letter combination that represents Swedish like:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    Change the //EN in the tag to your language code. According to an article with the W3C, your choices are:

    sv # Swedish
    sv-fi # Swedish (Finland)
    sv-se # Swedish (Sweden)

    So if you choose Swedish (Sweden) you would replace it with //SV-SE.

    And you will also have to set your character set to Swedish…and you should research this to make sure but one site tells me it should be:

    <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />

    But I’d check it out for sure to get it right.

    Yngwin

    (@yngwin)

    NO NO NO! Do not change the doctype! If you actually read that W3C document, you’ll see it doesn’t talk about the doctype, but the lang attribute of the html element.

    I strongly recommend you use Unicode: utf-8 is used by default in WordPress, and is the best solution to character encoding trouble. Make sure that your server actually serves your pages with that encoding, and have the corresponding meta tag say the same (the default WP setup should be fine).

    Be aware that utf-8 is not used by many editors, so you may have problems with copy-and-paste.

    Lorelle

    (@lorelle)

    Why not change the doctype? Just curious. In Hebrew, we had to. Does this change how the coding is read because the code is in English?

    I agree with the Unicode. I did say that the file I referenced dealt with the language codes in general, didn’t I?

    You should never change the language of the doctype declaration, not even for Hebrew. See the W3C’s list of possible valid DTDs. The EN language mentioned is the language of the DTD, which is always English.

    Thanks.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Swedish letter problem’ is closed to new replies.