#25096 [Opn->Fbk]: Recode adds weird characters behind converted string
| From: | moriyoshi@php.net | Date: | Fri, 15 Aug 2003 12:34:41 +0000 |
| Subject: | #25096 [Opn->Fbk]: Recode adds weird characters behind converted string | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-45950@lists.php.net to get a copy of this message | ||
ID: 25096
Updated by: moriyoshi@php.net
Reported By: spam at vrana dot cz
-Status: Open
+Status: Feedback
Bug Type: Recode related
Operating System: Linux
PHP Version: 4.3.1
New Comment:
What is the actual version number of recode you are using?
(That's not displayed on phpinfo) If you aren't using the latest
version, upgrade it first and see what'll happen.
Previous Comments:
------------------------------------------------------------------------
[2003-08-15 07:24:40] spam at vrana dot cz
Description:
------------
See example.
Recode returns weird characters behind 2*strlen($string) in
CP912..UTF-16 conversion (not only, also in UTF-8..CP912 and probably
others).
phpinfo() says Recode Revision: 1.29.
Reproduce code:
---------------
recode("CP912..UTF-16", "Pouzite prohlizece");
Expected result:
----------------
"\0P\0o\0u\0z\0i\0t\0e\0 \0p\0r\0o\0h\0l\0i\0z\0e\0c\0e"
Actual result:
--------------
"\0P\0o\0u\0z\0i\0t\0e\0 \0p\0r\0o\0h\0l\0i\0z\0e\0c\0eÔ\1\0\0" or
"\0P\0o\0u\0z\0i\0t\0e\0 \0p\0r\0o\0h\0l\0i\0z\0e\0c\0elong" or ...
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=25096&edit=1