[resolved] Accents on Mini Loop (8 posts)

  1. filduarte
    Posted 9 years ago #

    I created a blog with Word Press, and i want to show in my static front page the last 5 posts.
    Searching in this site I found a mini loop code, and it works, but the thing is:
    I am brazilian and accents should work, but they not. So words like: "País" (Country) are appearing "PaÃs".

    This problem happens just in Mini Loop. The Blog is showing accents correctly.

    Someone can help me?

  2. filduarte
    Posted 9 years ago #

    No one?! I really need fix this!
    The blog i created is not a personal one, but for my job, so I need fix this urgently!

  3. moshu
    Posted 9 years ago #

    Is that word [País] coming from the database or is it hardcoded in your "miniloop"?
    If the latter, you have saved the file with an encoding that is NOT utf-8.

  4. filduarte
    Posted 9 years ago #

    The mini loop code insert the title of the posts in my home page, so i guess that the word come from database.

    I've already tried to change the encoding, but it doesn't works...

  5. moshu
    Posted 9 years ago #

    Without a link it is difficult to detect where your problem is.
    What is the encoding of the file/page where you display the latest 5?

  6. filduarte
    Posted 9 years ago #


    the site is: http://www.jornaldovaletudo.com.br/
    and the blog: http://www.jornaldovaletudo.com.br/blog

    You'll see: in the index (at the right) the accents doesn't works, but in the blog, they do.

  7. moshu
    Posted 9 years ago #

    Nope. Your main site is NOT utf-8. It is iso-8859-1 (western) - that's why it is NOT displaying correctly text encoded with utf-8. WP's defulat encoding is UTF-8.

    (this is from your main site's head section:
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

    You will have to make sure the two encodings are the same.
    Beware that changing the encoding on old files/site will result in totally garbled code, which means you will have to re-write your text either on the main site or in the blog if you are going to change the encoding on any of them.

  8. filduarte
    Posted 9 years ago #

    Yeah... yeah... yeah...
    Shame on me...

    I'm sure that i've changed the encoding, but i guess that i miss something...


    But now that you start, can you see the topic below?


Topic Closed

This topic has been closed to new replies.

About this Topic