|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2016-01-21 16:06 UTC] see dot php at seos dot fr
[2016-07-28 12:44 UTC] cmb@php.net
-Package: mbstring related
+Package: ICONV related
[2016-07-29 08:19 UTC] cmb@php.net
-Status: Open
+Status: Not a bug
-Assigned To:
+Assigned To: cmb
[2016-07-29 08:19 UTC] cmb@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 22:00:01 2025 UTC |
Description: ------------ Hello. If try get length of cp1251-string with iconv_strlen() and encoding utf-8, this function print error "PHP Notice: iconv_strlen(): Detected an illegal character". If i add to encoding (utf-8) "//IGNORE" - notice print too. In iconv() this work and notice not show, but in iconv_strlen() is not work. Test script: --------------- <?php $cp1252str = ''; for ($i = 128; $i < 256; $i++) { $cp1252str .= chr($i); } print "Work iconv:\n"; iconv("cp1252", "utf-8//IGNORE", $cp1252str); print "Work iconv_strlen:\n"; iconv_strlen($cp1252str, "utf-8//IGNORE"); Expected result: ---------------- Notice not show Actual result: -------------- Notice show