Support » Fixing WordPress » 2.5.1 Adding  To end of words, mostly italics and spaces?

  • Hi,
    Here’s the situation. The only way we can duplicate this is by writing things in italics. If we do, at the end of some words, we get the  symbol…but here’s the kicker, it only shows up on the blog’s index page and NOT at the post page.

    The website, blog, database is all set to UTF-8, I’ve triple checked.
    In the wp-config.php it does NOT have the collate lines at all, so that’s not it (seems like commenting them out fixes other people’s issues, but those two lines aren’t even here)

    We’re using 2.5.1.

    Any help is appreciated.

Viewing 15 replies - 1 through 15 (of 17 total)
  • Another piece of information: I went and looked inside the database and it was there. It looked like this <em>Â</em>.

    I’m praying that Moshu looks at this..

    Hey Moshu,
    I found this:
    Is it possible double spaces are causing this? So far the samples I’ve seen were indeed after periods.

    I have the same problem with 2.6.

    It’s easy to reproduce too:

    * Create new post.
    * Use the “visual” editor.
    * End your first sentence with a period (.) followed by two spaces.
    * Begin and end another sentence.

    If your character encoding on your browser is set to Unicode (UTF-8) you will see the two spaces after the period, but if you change it to Western (ISO-8859-1) you will see the funny A character (Â).

    The funny A character makes it into the ‘post_content’ variable and into the DB; I have a custom plug-in I use to notify customers of new posts and the funny A gets sent out in those messages too.

    Note: if you re-save your post, the funny A character goes away in your published post.

    My Browser info.:
    Mozilla/5.0 (X11; U; Linux i686; en-US; rv: Gecko/20080703 Mandriva/ (2008.0) Firefox/

    I re-opened this ticket in response to this thread:

    In a related ticket ( ) I found this code snippet:

    $text = preg_replace("/[^\x20-\x7f\t\n\r]+/", "", $text); // ascii only

    That worked great in my custom plug-in for stripping out those non-ASCII characters.




    This problem is driving me crazy. I sat down last night to try to understand it.

    Now, when I choose to use the default theme the problem goes away. That is, when I view an existing post with these strange characters the post looks correct.

    When I use my own theme, which is heavily based on the default theme, the very same post shows the odd characters.

    I assumed that there was simply some charset issue with my theme, but no – the header is the same between the two. Furthermore, WordPress itself fills in the charset information for the content-type, and it uses UTF-8 for both themes.

    However, when WordPress writes out the post to my theme, it writes it with the strange characters – I can see them in the generated source. When it writes the post to the default theme it doesn’t.

    So for some reason it seems that it’s changing the output encoding when writing the post to my template, but I have no idea why. I’ve tried to track it down but it’s hard to know where to look.

    Please let me know if there’s anything I can do to help track this problem down.




    I’ve got two blogs that were exposed to this defect in the latest upgrade. I’d love to see a solution soon (with more understandable steps to fix).



    Just to let you know that I’ve upgraded to 2.7.

    I took the 2.7 default theme and made a few changes, and once again the problem had come back.

    Please, I’ll do anything I can to help get this fixed.




    OK, I’ve found it.

    It’s taken me hours to track it down, but it turns out that my head code called another library function to set up the locale, and this in turn used the PHP header() thusly:

    header(“Content-Type: text/html; charset=ISO-8859-15”);

    And that broke stuff. No idea why two spaces should be converted to an accented character, but in any case changing this to UTF-8, as it should be, solved the problem.


    Tim — can you be more specific on your fix? It sounds like you replaced some PHP code in the theme? Which file? Which code? Thanks.

    Shields, not to speak for Timarmes, but look at your theme’s header.php …where the meta tag is declared. Make sure the charset= field is set to utf-8. In my theme, it’s grabbing the charset field from the WordPress Admin –> Settings –> Reading –> “Encoding for pages and feeds” field by using the following code in the header.php

    Charset field by using the following code

    <meta http-equiv=”Content-Type” content=”<?php bloginfo(‘html_type’); ?>; charset=<?php bloginfo(‘charset’); ?>” />

    By the way, I also have this weird character problem and am looking for a solution. How come no one representing wordpress knows anything about this? This problem seems pretty systemic… And all these weird characters happened after I upgraded from 2.6.7 to 2.7.0.

    The problem was in my customised theme.

    I called out to my own header code that I use on the rest of my site, and this set up the locale which in turn sent the header that I described above.

    The header’s are part of the HTTP protocol, not the HTML protocol, so they’re not seen in the page source. My page source was using UTF-8, but the header was set as ISO-8859-15, and this inconsistancy was the cause of the problems.


    Where is the header file someone? I am trying…

    I see my header calling bloginfo but I have no idea where that is…

Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘2.5.1 Adding  To end of words, mostly italics and spaces?’ is closed to new replies.