I am creating a brazilian website which needs to support foreign figures like á, à, ó, í ú, ê, etc. Additionally, it uses AJAX and so i thought easier to use charset UTF-8 'cause I usually obtain the � character and I'm not sure how you can fix this.

My navigation menu seems properly when utilizing UTF-8 (becasue it is querying the database to render the entire menu), but I'm not sure the way it does. Here are a few screenshots from the database and just how it renders: The databasealt text

To date so great. Unfortunately which i began using Zend_Navigation for rendering breadcrumbs and I'm not sure how you can let go of the � character i am getting: the breadcrumbalt text

What must i do? Alter the charset to ISO-8858-1? I've already carried this out however it seems everything wrong such as this:

alt text

EDIT

Additionally, after i change it out to missão for instance it shows missão rather than missão. Besides, I can not change it out by hand 'cause it is incorporated in the database, I want kind of a function that will handle this

EDIT 2

I transformed the special character during my database like çã to çã and today the HTML is rendering fine. Although, I am while using Zend_Navigation for breadcrumb and it is rendering missão rather than missão much like this:

alt text

I additionally authored a XML file using Zend_Config_Author_Xml and that i view it printed <label>Informa&#xE7;&#xF5;es</label> rather than <label>Informações</label>. Just just in case that can help

How must i proceed?

Here's an excellent article that assisted me after i began web design. Sometimes inside a multilingual atmosphere and so i encounter these items constantly (just to increase how great the content was :)

The Absolute Minimum Every Software Developer Absolutely, Positively Must Know About Unicode and Character Sets (No Excuses!)

I usually make certain that my files are held in UTF8 line encoding, that my php header files declare the charset as utf8, that my db uses utf8_general_ci for it's collation, which my html mind tag consists of the meta tag proclaiming this content as utf8. I believe that covers it.

HTH :)

edit: simply to add (to become more targeted at the specific problem) determine in case your PHP code goodies your results as utf8. The information may be saved properly around the DB but tend to be converted when it is being offered.

Make certain that the database uses the UTF-8 charset As well as your database connection (the encoding where the chars are moved between MySQL as well as your PHP code) is UTF-8 (see this post for reference).

Also note, that some string procedures in PHP break UTF8 encoded strings ebcause they focus on the assumption "1 char = byte" which isn't true with UTF 8. htmlspecialchars will not use UTF-8 encoded strings.

Try altering .php file encoding - open .php file and save it (or overwrite it) as utf8 file. Hope it will help.