WordPress.org

Ready to get started?Download WordPress

Forums

Æ, Ø and Å (Danish characters) (13 posts)

  1. Niemi
    Member
    Posted 7 years ago #

    Hello.

    I'm using UTF-8 and it works great for showing these chars when posting and commenting etc. But when I'm writing them in my .php files the show up invalid.

    How to overcome this problem?

  2. moshu
    Member
    Posted 7 years ago #

    1. Don't post the same solution in then places (this is about your other topic :)

    2. Make sure you save those files wiht the proper encoding - utf-8. Even the Notepad has the option to save the file after editing with different encodings.

  3. Chris_K
    Member
    Posted 7 years ago #

    Check your text editor settings and make sure that it is also in utf-8

    [moshu beat me]

  4. Niemi
    Member
    Posted 7 years ago #

    Moshu >> I posted the solutions in different threads where the issue wasn't yet solved. If one make a thread concerning his problem about the UTF-7 bug, it doesn't help him much if no one answers him in his thread.

    Well, at least not if I don't search for the topic and find the solution in another thread. :D

    Mosh and Handy, what exactly to you mean by "Make sure you save those files wiht the proper encoding" and" "make sure that it is also in utf-8"?

    Can I specify the charset somewhere in the .php files or?

  5. Chris_K
    Member
    Posted 7 years ago #

    Niemi - just keep an eye on the last post in the thread. If more than a month or two ago, you can safely assume the original poster isn't checking back daily for an answer...

    Can I specify the charset somewhere in the .php files or?

    Nope, in your text/code editor. For instance, I use Notepad++. One of the options it offers is to specify the character set. Even Windows Notepad will save in a couple charsets.

  6. Niemi
    Member
    Posted 7 years ago #

    Okay, I found the line

    <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />

    in the header.php and pasted it to the footer, but it just changed "Å" to two aa's. Now I can't even type Æ, Ø and Å in the .php footer. It shows ;'[ instead.

  7. moshu
    Member
    Posted 7 years ago #

    NO!!!
    Why don't you read more carefully?
    You don't touch anything in header and/or footer.

    You watch your editor! What are you using to edit the template files?

  8. Niemi
    Member
    Posted 7 years ago #

    I'm using Dreamweaver, I'm trying to read VERY carefully though...

  9. moshu
    Member
    Posted 7 years ago #

    Use Notepad. Simple, no mess.

    When saving a file you will have a dropdown option to select the Encoding. Select utf-8.
    Done.

  10. Niemi
    Member
    Posted 7 years ago #

    Oh I see. Notepad being more advanced than Dreamweaver. Quite impressive. :D

    But thanks, it works very well now. I'll just open all .php files in notepad and save them as UTF-8 now.

  11. Chris_K
    Member
    Posted 7 years ago #

    Well, to be honest: Editing WP theme files in Dreamweaver is a lot like swatting a fly with a Buick. :-)

    In other words, total overkill and prone to collateral damage.

  12. Niemi
    Member
    Posted 7 years ago #

    Handy, you might be right but I can't be without Dreamweavers built-in FTP-client. I like to be able to upload directly.

  13. willel
    Member
    Posted 7 years ago #

    there is no way to make this work i DW? sounds insane to have to 'go through' notepad. what tha heck does the "edit > preferences > new document > default encoding : Unicode UTF-8 ", nothing apparently? Thank!

Topic Closed

This topic has been closed to new replies.

About this Topic