note 57371 added to function.utf8-decode
| From: | thierry dot bo#netcourrierpointcom at osu1 dot php dot net | Date: | Sat, 01 Oct 2005 19:53:03 +0000 |
| Subject: | note 57371 added to function.utf8-decode | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-96144@lists.php.net to get a copy of this message | ||
to complete my previous test, here is the summarize with :
- if ($string == utf8_decode($string))
- if ($string == iconv('UTF-8', 'UTF-8', $string)
201 lines are valid UTF8 strings using phpnote regexp
203 lines are valid UTF8 strings using j.dittmer regexp
200 lines are valid UTF8 strings using fhoech regexp
239 lines are valid UTF8 strings using using mb_detect_encoding
203 lines are valid UTF 8 strings using using utf8_decode
224 lines are valid UTF 8strings using using iconv
If we trust the file used for this test, no need to use a regexp, use XML::utf8_decode() to test
your strings, you get the same detection chance as the three regexp tested, and XML Parser extension
is almost always available, unlike Iconv and Multibyte String functions.
----
Manual Page -- http://www.php.net/manual/en/function.utf8-decode.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+57371
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+57371&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+57371&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+57371&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+57371&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+57371&report=yes&reason=non-english
Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+57371&report=yes&reason=already+in+docs
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+57371&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+57371&report=yes
Search -- http://master.php.net/manage/user-notes.php