I have some text in French in a MySQL field, which appears correctly under PHPMyAdmin:
mentionné
The field is encoded as utf32_unicode_ci. (It is a varchar(500), utf32_unicode_ci).
but a call to a PHP script calling this parameter and outputing in html encoded in utf-8 returns:
mentionn�
Here is an extract of my php html header:
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="fr-FR">
<head profile="http://gmpg.org/xfn/11">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
How can I fix this?
Please, besides the database encoding, be sure you check the following:
<meta HTTP-EQUIV="content-type" CONTENT="text/html; charset=utf-8">SET character_set_connection = 'utf8'SET character_set_results = 'utf8'SET character_set_client = 'utf8'ALTER TABLE table CONVERT TO CHARACTER SET utf8;SET character_set_database = 'utf8' and SET character_set_server = 'utf8'charset=utf-8, so ultra edit or your favorite editor can detect it.rgds.
ps: I don't know utf32 but somehow the logic should be the same
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With