My questions would be:
- What encoding is your PHP file written in?
- What encoding is your output in?
If you do not know the answer to these questions, you need to find out.
If it's not the same, there's your problem. Seems likely to me like your PHP file is written in UTF-8 and your output is in ISO-8859-1.
If either of them is a multibyte or variable encoding like UTF-8 or one of the eastern multibyte character sets, you are in trouble.
PHP does not support multibyte character sets very well. Personally I would never use PHP for a site which required a multibyte character set.
Fortunately because I live in an English-speaking country and the nearest biggest European countries to me also use single-byte character sets, this is not a problem for me.
Mark