I\'m working on a site where the user can switch between English and French. To output the date of posts.
If the user chooses French I use:
setlocale
The Content-Type header needs to set the code page to UTF-8.
header('Content-Type: text/html; charset=UTF-8');
Since you can't change the header once you've output anything to the page with echo or print make sure you set it early in the page.
The ASCII code page is fully contained in UTF-8 not vice-versa.
Replace the UTF-8 header with the ASCII one and you'll see what happens when the characters aren't included in the current code page.