Forum Replies Created

Viewing 5 replies - 1 through 5 (of 5 total)
  • Forum: Fixing WordPress
    In reply to: URL questions
    Thread Starter timarmes

    (@timarmes)

    Hi Shane,

    Thanks for your response.

    I’m not sure what you mean by “your query does not work for blogs”.

    I’m finding it hard to express the problem clearly. My WordPress installation is stored in a folder called “blog” on my server, hence the blog is now accessed at “/blog”.

    What I’d like to do is move WordPress to the root and have the static pages served by WordPress from there, but somehow have the actual blog maintained at /blog

    Since it’s possible to have WordPress manage nice urls (such as /blog/2008/my-blog-entry) from within the /blog directory, I wondered if it would be possible to have it serve the same URLs from the root directory (i.e. by prefixing the current URLs with “blog”), but only do this for the blog, not for the static pages.

    Phew…

    Tim

    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.

    Tim

    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

    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.

    Tim

    Hi,

    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.

    Tim

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