[PATCH] Bug 43477 - Unicode error mode ignored
| From: | Stephen Bach | Date: | Tue, 18 Mar 2008 03:51:12 +0000 |
| Subject: | [PATCH] Bug 43477 - Unicode error mode ignored | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-36185@lists.php.net to get a copy of this message | ||
Attached is a simple proposed patch that fixes Bug 43477. Basically, the code
that set the error mode of the ICU converter was giving it an instruction
(the context parameter) to only skip or substitute if the code point was not
represented in the new encoding. However, it still was returning an error for
illegal sequences.
The test suite returns the same results with or without the patch. Test also
attached.
-Stephen Bach
Attachment: [text/x-diff] bug43477.patch
--TEST-- Bug #43477 (Unicode error mode) --FILE-- <?php var_dump(unicode_decode(b"\xF8", 'UTF-8', U_CONV_ERROR_SKIP)); ?> --EXPECT-- unicode(0) ""
Attachment: [text/x-diff] bug43477.patch
--TEST-- Bug #43477 (Unicode error mode) --FILE-- <?php var_dump(unicode_decode(b"\xF8", 'UTF-8', U_CONV_ERROR_SKIP)); ?> --EXPECT-- unicode(0) ""