Hi,
I have encountered a strange problem with character encoding(?). I am using the good default UTF-8 encoding. For editing my template I use an editor that supports UTF-8 (EditPad on Windows, mcedit+iconv and other editors on Linux). When the page is displayed, in my templates I get question marks ("?") instead of the i18 characters that should be there. Funny thing is that the content generated by WP has no problems. The template is definitely correctly UTF-8 encoded, but when it comes back to the browser (view source), all non-standard characters are changed to ?'s, but only those in my template files. When I use hex xhtml entities (& # 0x142; etc...), everything is displayed a-ok. Have you ever seen something like that? Does PHP do something bad with the templates? Is it some server configuration problem? The same page in a static version, before being turned into a WP template, looked just as it should, and it was utf-8 too.
That always happens when the template files are NOT saved with utf-8 encoding after editing. An editor might have support for utf-8 but you must 'tell it' to save the file with that encoding.
Thanks for the answer, but as I said I am _sure_ the files are correctly encoded. At first I thought it must be something wrong with the editor, but the template files are UTF-8 encoded for sure. I did a sanity check of creating a file and converting it to UTF-8 using iconv and I still had the same results. The templates ARE utf-8. Here's a test:
http://www.centrala.website.pl/plonk.txt - this is an utf-8 file
http://www.centrala.website.pl/plonk.php - this is THE SAME FILE with a changed extension. I have no idea what does the local PHP do with the poor file.
Files parsed by PHP already have the ???'s inside, no 2-byte characters.
OK, it's something wrong with server's PHP. I switched PHP 5 a separate file extension handler, and now I get:
http://www.centrala.website.pl/plonk.txt - original file, OK
http://www.centrala.website.pl/plonk.php - handled by PHP 4, OK
http://www.centrala.website.pl/plonk.php5 - handled by PHP 5, NOT OK. Now it's time to yell at the hosting provider.
Sorry for posting so many times. There's a typo in my last post. The version handled by PHP4 is http://www.centrala.website.pl/plonk.php4