Can anyone help with with special characters and php.
The following php:
$IHaventReceivedCode = "Je n'ai pas reçu mon code";
is showing as:
Je n'ai pas re�u mon code
I have tried adding to the file at the top:
ini_set('default_charset', 'UTF-8');
header('Content-Type: text/html; charset=UTF-8');
and also to the head tag:
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
However, the character fails to show.
Any ideas?
Try to convert the document to that encoding. If for example you are using Notepad++ you can do the following:

If your files are in UTF-8...
You can try utf8_encode
$IHaventReceivedCode = utf8_encode("Je n'ai pas reçu mon code");
Or decode utf8_decode
$IHaventReceivedCode = utf8_decode("Je n'ai pas reçu mon code");
I'm pretty sure that one of them should change the output...
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