Everything is in the question : I have a Php script that is a UTF-8 file. In this script I want to do this :
<?
echo "âêïû\n";
?>
If I run it in a Windows prompt I get this :
C:\php>php -c C:\WINDOWS\php.ini -f mysqldump.php
âêïû
C:\php>
I've not been able to find the right conversion scheme. I've tried also this code :
$tab = mb_list_encodings();
foreach ($tab as $enc1) {
foreach ($tab as $enc2) {
$t=mb_convert_encoding("âêïû\n", $enc1, $enc2);
if (strlen($t)<14) {
echo $enc1." ".$enc2." = ".$t."\n";
}
}
}
And I didn't find the right conversion !
Any help would be greatly appreciated
The problem is Windows cmd line by default does not support UTF8. From this link, if you follow these
You should be able to output utf8.
It looks the default encoding is Code page 437.
You put me on the right track but there was kinddof a problem (I love Windows \o/) :
Mémoire insuffisante = not enough memory.
If I try
it works. Only God knows why. But it works. Thanks for putting me on the right track !!
By the way the php code to go properly form UTF8 to command prompt is :
Try this another one. It's working with Russian encoding, I hope it will work with French: