Forum Replies Created

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter bennett

    (@bennett)

    Well, also for the record, all of my blog posts which caused validation errors, were created by writing and editing them in the WordPress interface 🙂 — but even if those validation errors caused by WordPress, I still wouldn’t call it a bug as long as it works fine in the browser.

    Now I did notice the error on the validator page about the encoding, however it makes no sense since it says: “The character encoding specified in the HTTP header (iso-8859-1) is different from the value in the <meta> element (utf-8). I will use the value from the HTTP header (utf-8) for this validation.”

    Presumably the last sentence meant to say: “I will use the value from the HTTP header (iso-8859-1) for this validation.”

    Ah OK, so I crossed my fingers that this would be controlled somewhere in httpd.conf, and it was: I changed the line “AddDefaultCharset ISO-8859-1” to “AddDefaultCharset UTF-8”, and now http://www.peacefire.org/ loads fine, with no little pointy-hatted A’s in the blog excerpts.

    However, I would still argue that it’s a bug for WordPress to be inserting 0xC2A0 characters every time I type a double space, instead of using plain old 0x20 space characters, because there’s nothing lost by using 0x20 spaces, and 0xC2A0 spaces make the excerpts incompatible with pages that use ISO-8859-1 encoding. For a Web server to use ISO-8859-1 encoding is not in and of itself “wrong” so it would seem to make sense for WP to be compatible with those pages if there’s no sacrifice anywhere else.

    Thread Starter bennett

    (@bennett)

    OK I didn’t realize that Yosemite was saying that the doctype error *specifically* was something I should fix to solve the problem. (I thought he just meant it as the first in a list of syntax errors…)

    So, I added a doctype to the top of the page, but the A’s with pointy hats are still there:
    http://www.peacefire.org/

    Yes, the page validator still lists other errors, but I don’t know which errors are probably related to this problem. Rather than spending hours trying to fix all the syntax errors that have nothing to do with the problem (and which haven’t been causing problems in any major browser in the years that the site has been up), can you tell me if there’s something I should change that will make it work with the WordPress excerpts?

    Even http://www.peacefire.org/blog/ , whose content is generated entirely by WordPress, gives some syntax errors in the validator, so it’s not like every page on the WWW has to pass with 100% validity in order to work 🙂

    Thread Starter bennett

    (@bennett)

    When I use a telnet program to get “/index.php” from http://www.peacefire.org port 80, it is sent with the header:
    Content-Type: text/html; charset=ISO-8859-1

    On the other hand, when I get /blog/ , it is sent with the header:
    Content-Type: text/html; charset=UTF-8

    So, maybe that’s why the characters are displaying funny in the post content on http://www.peacefire.org. OK, but how do I fix it?

    I tried adding:
    <meta http-equiv=”Content-Type” content=”text/html; charset=UTF-8″ />

    to the <head> section of the http://www.peacefire.org front page, but that didn’t work, the A’s still showed up with their pointy hats.

    Meanwhile, even if there is a workaround, I still think it should be considered a bug that WordPress serves the content with those funny A-with-pointy-hat characters… a plane old 0x20 space would have been fine 🙂

    Thread Starter bennett

    (@bennett)

    I found the answer; the code at the link above:
    vindictivebastard.net/downloads/last-10-posts.txt
    is incomplete, you have to add:
    <?php require(“/var/www/html/blog/wp-blog-header.php”); ?>
    to the top of the file for it to work.

    Thread Starter bennett

    (@bennett)

    That’s what I was referring to in my last post, I tried pasting that code into:
    http://www.peacefire.org/test-last-10.php
    but it’s giving me:
    “Fatal error: Call to undefined function: _e() in /var/www/html/test-last-10.php on line 2”

    What am I doing wrong?

    I tried putting the file in the “/blog/” directory but that didn’t work either:
    http://www.peacefire.org/blog/test-last-10.php

    Thread Starter bennett

    (@bennett)

    I don’t understand, what should I actually do with the code in that text file?

    I seem to remember the earlier version of the reply contained more information about what to actually do — it looks like when you edited it, the old information got deleted?

    I tried pasting that code into a file at:
    http://www.peacefire.org/test-last-10.php
    but that gave the error:
    “Fatal error: Call to undefined function: _e() in /var/www/html/test-last-10.php on line 2”

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