Support » Fixing WordPress » Special characters

  • Resolved mike


    Is there something unique about how the tilde on “Peña” is handled on WP pages if that string is placed statically on a WP page? On this page near the top under “Highlights” Peña is all messed. When I then output that same string to another non-WP page (it is a php function) I get the right result here. Any ideas?

    Update: I tried to replicate this problem on another blog of mine with a different theme. If I paste


    statically in the header file of the Kubrick theme, the tilde doesn’t show up properly. Is this a bug?

Viewing 9 replies - 1 through 9 (of 9 total)
  • Probably not a bug but the fact that you are editing files in a text editor that doesn’t have utf-8 support and since WP’s default encoding is utf-8, all your special characters saved with a different encoding show up messy.

    But the initial problem is with a server side script that extracts info from a postgresql database. The (almost) same function works here but doesn’t work here. The only difference that I can tell is the former doesn’t have wp-head(). I have replicated the problem with Notepad, Notepad++ and DW.

    Try to validate both links you gave me above and you’ll see it’s an encoding issue.

    Ok, ran those tests and the blog page failed.

    I still don’t understand why the same php script that outputs Peña (I do not enter it statically in non-UTF-8, the string is generated server-side) looks differently on a WP page than on a non-WP page. If you look at the source of the second link, I simply pasted the header and script from the WP sans wp_head(). I am sorry if I am ignorant of these encoding issues. Thanks!

    BOTH pages failed!
    I don’t know what script are you using but for sure it generates something encoded with iso-8859-1 and WP’s encoding is utf-8. All the special characters saved/generated with a different encoding – will show up as “garbage” on a utf-8 page.
    You cannot have more than one encoding on a webpage (and where you say it is “working” actually is sending two different encodings).

    Eeek. Sorry, I will have to look closer at this. I wasn’t criticizing WP!

    You are welcome to criticize WP as much as you wish 🙂 No problem with that.
    Messing encodings would cause headache on any site – regardless of the tool/engine used.

    I just don’t know much about encodings…well nothing. This script has worked for years on every one of our other pages and now I see that it works on a blog 404 page…weird! Thanks for your help.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Special characters’ is closed to new replies.