I am not sure whether this is truly a PHP5 problem, but I recently upgraded from 4 to 5 and then this problem appeared.
I retrieve from a mySQL database some strings, some of which have characters with umlauts. These characters appear as question marks:
Misha k?r-?n-ne (the original page can be found here: http://languagelink.let.uu.nl/floris/tablecreate/myrunquery.php)
However, if I run the script from the command line, and then pipe the output to a HTML file (on UNIX: php myrunquery.php > myrunquery.html) , it does show the characters correctly:
Misha kör-ün-ne (source: http://languagelink.let.uu.nl/floris/tablecreate/myrunquery.html)
It also works if I copy the correct string into a PHP-file like <?php echo "Misha kör-ün-ne"; ?>
Obviously this is shows a difference between the CLI- and the Apache module-way of running PHP.
It is a very strange problem that has kept me occupied for a while now, so any ideas or suggestions are greatly appreciated.