note 39549 added to function.mb-convert-encoding
| From: | jamespilcher1-hotmail at rn2 dot php dot net | Date: | Mon, 02 Feb 2004 00:55:57 +0000 |
| Subject: | note 39549 added to function.mb-convert-encoding | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-64529@lists.php.net to get a copy of this message | ||
be careful when converting from iso-8859-1 to utf-8.
even if you explicitly specify the character encoding of a page as iso-8859-1(via headers and strict
xml defs), windows 2000 will ignore that and interpret it as whatever character set it has natively
installed.
for example, i wrote char #128 into a page, with char encoding iso-8859-1, and it displayed in
internet explorer (& mozilla) as a euro symbol.
it should have displayed a box, denoting that char #128 is undefined in iso-8859-1. The problem was
it was displaying in "Windows: western europe" (my native character set).
this led to confusion when i tried to convert this euro to UTF-8 via mb_convert_encoding()
IE displays UTF-8 correctly- and because PHP correctly converted #128 into a box in UTF-8, IE would
show a box.
so all i saw was mb_convert_encoding() converting a euro symbol into a box. It took me a long time
to figure out what was going on.
----
Manual Page -- http://www.php.net/manual/en/function.mb-convert-encoding.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+39549
Delete -- http://master.php.net/manage/user-notes.php?action=delete+39549&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+39549&report=yes
Search -- http://master.php.net/manage/user-notes.php