php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #25096 Recode adds weird characters behind converted string
Submitted: 2003-08-15 07:24 UTC Modified: 2003-08-15 07:42 UTC
From: spam at vrana dot cz Assigned:
Status: Not a bug Package: Recode related
PHP Version: 4.3.1 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: spam at vrana dot cz
New email:
PHP Version: OS:

 

 [2003-08-15 07:24 UTC] 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 ...

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-08-15 07:34 UTC] moriyoshi@php.net
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.




 [2003-08-15 07:42 UTC] derick@php.net
Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. Because of this, we hope you add your comments
to the existing bug instead.

Thank you for your interest in PHP.

I once checked another related bugreport too, it was a bug in librecode then too, and I remember upgrading it to the latest version which did not resolve the problem. I'm bogussing this, please add further comments to #17154.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Mar 19 03:01:29 2024 UTC