note 57069 added to function.utf8-decode
| From: | fhoech at osu1 dot php dot net | Date: | Thu, 22 Sep 2005 17:12:45 +0000 |
| Subject: | note 57069 added to function.utf8-decode | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-95627@lists.php.net to get a copy of this message | ||
JF Sebastian's regex is almost perfect as far as I'm concerned. I found one error (it
failed section 5.3 "Other illegal code positions" from http://www.cl.cam.ac.uk/~mgk25/ucs/examples/UTF-8-test.txt)
which I corrected as follows:
^([\\x00-\\x7f]|
[\\xc2-\\xdf][\\x80-\\xbf]|
\\xe0[\\xa0-\\xbf][\\x80-\\xbf]|
[\\xe1-\\xec][\\x80-\\xbf]{2}|
\\xed[\\x80-\\x9f][\\x80-\\xbf]|
\\xef[\\x80-\\xbf][\\x80-\\xbc]|
\\xee[\\x80-\\xbf]{2}|
\\xf0[\\x90-\\xbf][\\x80-\\xbf]{2}|
[\\xf1-\\xf3][\\x80-\\xbf]{3}|
\\xf4[\\x80-\\x8f][\\x80-\\xbf]{2})*$
(Again, concatenate to one single line to make it work)
----
Manual Page -- http://www.php.net/manual/en/function.utf8-decode.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+57069
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+57069&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+57069&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+57069&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+57069&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+57069&report=yes&reason=non-english
Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+57069&report=yes&reason=already+in+docs
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+57069&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+57069&report=yes
Search -- http://master.php.net/manage/user-notes.php