Do you have a question? Post it now! No Registration Necessary. Now with pictures!
April 13, 2005, 3:50 pm
rate this thread
I've got a problem with utf-8 strings.
I start with getting a string from a database and when i encode it
utf8Encode($str) and output it to the browser (which has a utf-8
encodig), there is no problem displaying special symbols (like the
euro sign €).
But then i want to creat an xml document and write the following to a
<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>
But when i open the xml file the special symbols are gone :-S.
I've tried a lot, but can't get it working.
So please help!
BTW: I'm using server with this phpinfo:
Re: UTF-8 fwrite problem
That is strange... According to the manual it translates an iso8859-1
string to UTF-8. And iso8859-1 doesn't have an euro symbol. Just like
the euro symbol is missing in the charset you posted this in, the ?
above is a 0 char which is illegal in iso8859-1
Please post an URL to an example. My gues is that the http headers
(which have priority) set the encoding to something else.
It appears that iconv is installed, sadly enough mstring is missing
(modules aren't loaded it seems).