#37773 [Opn->Fbk]: iconv_substr() gives "Unknown error" when string length = 1"

From: Date: Mon, 12 Jun 2006 10:40:17 +0000
Subject: #37773 [Opn->Fbk]: iconv_substr() gives "Unknown error" when string length = 1"
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-98289@lists.php.net to get a copy of this message
 ID:          37773
 Updated by:  tony2001@php.net
-Summary:     Can't access file via file://
 Reported By: dave at dgx dot cz
-Status:      Open
+Status:      Feedback
 Bug Type:    ICONV related
 PHP Version: 5.1.4
 New Comment:

Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.2-win32-latest.zip




Previous Comments:
------------------------------------------------------------------------

[2006-06-10 00:03:08] dave at dgx dot cz

Of course, title is: iconv_substr() gives "Unknown error" when string
length = 1" 

Operating system: Windows XP.

It is not my error - bugs.php.net has bugs!

------------------------------------------------------------------------

[2006-06-10 00:01:14] dave at dgx dot cz

Description:
------------
(Similar to bug #34757).

When input string length = 1, iconv_substr() produces "Unknown error
(0)" and returns FALSE.

Reproduce code:
---------------
$s = 'x';
$s = iconv_substr($s, 0, 1, 'UTF-8');

var_dump($s);

Expected result:
----------------
string(1) "x"



Actual result:
--------------
bool(false)


and Notice: iconv_substr() [function.iconv-substr.html]: Unknown error
(0) in ...





------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=37773&edit=1


Thread (7 messages)

« previous php.bugs (#98289) next »