I'm listing the customers names on my webpage with PHP retrieving data from MySql, but some of them are called José, João, but when I echo the result on the page, it shows Jos� and Jo�o. The collations of the tables are all on utf8_general_ci what can I possibly be doing wrong??
Asked
Active
Viewed 337 times
3 Answers
1
This appears to be a browser display issue. Try adding the following line between the head tags of your html document.
<meta charset="UTF-8">
This should solve the problem. If not, leave a comment And I'll help you resolve it.

dlporter98
- 1,590
- 1
- 12
- 18
1
Your page source code should also be utf-8 encoded, to display UTF8 encoded characters, otherwise your browser tries to apply character encoding from http header to you strings.

Marat
- 617
- 5
- 12
0
use
echo utf8_encode($yourstring);
but, also is recommended to set in html
<meta charset="UTF-8">
and consider to create database with utf-8 encoding and collation spanish or whatever it have this kind of characters

Rene Limon
- 614
- 4
- 16
- 34