How to handle foreign languages?

I am developing a Brazilian site that should support foreign characters, for example á, à, ó, í ú, ê, etc. It also uses AJAX, so I decided to use charset UTF-8because I always get the character, and I don't know how to fix it.

My navigation menu displays correctly when used UTF-8(since it queries the database to display the entire menu), but I don't know how to do it. Here are some screenshots from the database and its rendering: The databasealt text

So far so good. The trouble is that I started using Zend_Navigation to render breadcrumbs, and I don’t know what to do to get over the character that I get: the breadcrumbalt text

What should I do? Change the encoding to ISO-8858-1? I have already done this, but everything seems to be wrong:

alt text

, missão, , missão missão. , , , ,

EDIT 2

çã çã, HTML . , Zend_Navigation breadcrumb missão missão :

alt text

XML , Zend_Config_Writer_Xml, <label>Informa&#xE7;&#xF5;es</label> <label>Informações</label>. ,

?

+3
3

, , -. , ( , :)

, Unicode ( !)

, UTF8, php utf8, db utf8_general_ci headt html , utf8. , .

HTH:)

edit: ( ) , PHP- utf8. , .

+6

, UTF-8. (, MySQL PHP-) UTF-8 (. ).

, PHP UTF8 ebcause, "1 char= byte", UTF 8. htmlspecialchars UTF-8.

0

.php - .php ( ) utf8. , .

0
source

Source: https://habr.com/ru/post/1773871/


All Articles