strange characters in blog

Discussion in 'Installation/Configuration' started by m u r, Mar 16, 2006.

  1. m u r

    m u r New Member

    On a separate forum, I found a solution to a problem I'm having (strange characters showing up in my blog). Here is an example of the problem:

    http://ryanbrijs.com/blog/Site/Blog/CEE9DBC9-460A-4E51-B392-218881BBD340.html

    Here is the solution, but I'm not sure how to fix my server if that is indeed the problem:

    Server Problems: If a page you create in iWeb and publish to a server other than .Mac contains strange unwanted characters, try setting View > Text Encoding to UTF-8. If this makes it appear correctly, it means your server is probably forcing browsers to interpret the page as being in Latin-1 encoding. iWeb pages are in UTF-8 encoding so that they can accomodate all languages, not just English and those of W. Europe, and there is no practical way to change this.
     
  2. falko

    falko Super Moderator ISPConfig Developer

    UTF-8 is still a bit problematic.

    In the header of the page you linked I see this:

    HTML:
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    Please try this instead:

    HTML:
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
     
  3. m u r

    m u r New Member

    I replaced the code and it still didn't work. In another forum by the makers of the blog program, they said I have "faulty server settings which force all browsers to use the wrong encoding." Is there a way to change it so my server doesn't do this? The blog "is in UTF-8 encoding so that it can accomodate all languages, not just English and those of W. Europe, and there is no practical way to change this."

    Is there a way to create a .htaccess file? If so, where do I put it based on the webFTP through ISPConfig? This is what I was told in the other forum:

    Web servers should not be set up this way: They should let the code inside the page determine what encoding the browser is set to. If the people running the server will not change it, you may still be able to set up a separate .htaccess file for your space .

    A typical entry in an .htaccess file would be "AddDefaultCharset UTF-8" or "AddCharset UTF-8 .html" or possibly "AddDefaultCharset Off" (no quotes). This file should be located at the top level of your space on the server (not inside a public_html folder if there is one). Files with a . before the name are often invisible, so you may need to select "show hidden files" or a similar setting to see them.

    If your server uses XSHTTPD, you should edit the ".charset" file to contain the line: UTF-8.

    A good program for making/editing such files is TextWrangler.

    If you cannot have your own .htaccess file (some servers do not allow this), the only practical solution may be to publish your page someplace else which follows the proper practice, or use a different web creation program where you can set the encoding to Latin-1.
     
    Last edited: Mar 17, 2006
  4. falko

    falko Super Moderator ISPConfig Developer

    You can put these directives directly into the "Apache Directives" field in ISPConfig, or you create an .htaccess file (with Unix linebreaks!) and upload it to your blog directory with FTP.
     
  5. m u r

    m u r New Member

    It worked! Thank you so much! You're brilliant.
     

Share This Page