I am having problems with accentuation in a project that I am giving maintenance.
Table MYQL using utf8_unicode_ci
String Error
$text = 'São Jos�'; #correct São José
echo utf8_decode($text); #print São Jos�
echo utf8_encode($text); #print São Jos�
How to solve using php 5.6?
答案 0 :(得分:1)
Before you fetch result from the database, fire below query,
SET NAMES UTF8;
This will set the character-set and the results returned will be proper.