#25096 [NEW]: Recode adds weird characters behind converted string
| From: | spam at vrana dot cz | Date: | Fri, 15 Aug 2003 12:24:40 +0000 |
| Subject: | #25096 [NEW]: Recode adds weird characters behind converted string | ||
| Groups: | php.bugs php.bugs | ||
| Request: | Send a blank email to php-bugs+get-45948@lists.php.net to get a copy of this message | ||
From: spam at vrana dot cz
Operating system: Linux
PHP version: 4.3.1
PHP Bug Type: Recode related
Bug description: Recode adds weird characters behind converted string
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 bug report at http://bugs.php.net/?id=25096&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=25096&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=25096&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=25096&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=25096&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=25096&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=25096&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=25096&r=support
Expected behavior: http://bugs.php.net/fix.php?id=25096&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=25096&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=25096&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=25096&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=25096&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=25096&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=25096&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=25096&r=gnused