|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #43672 Linux fails with iconv("Shift_JIS", "Shift_JIS//TRANSLIT", $result);
Submitted: 2007-12-25 03:43 UTC Modified: 2008-01-28 23:57 UTC
From: parkinson at fm-net dot ne dot jp Assigned:
Status: Not a bug Package: ICONV related
PHP Version: 5.2.5 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
37 + 36 = ?
Subscribe to this entry?

 [2007-12-25 03:43 UTC] parkinson at fm-net dot ne dot jp
iconv fails on linux when the encoding types are both Shift_JIS

looks a bit like Bug #38425, I agree with the comment:

"shouldn't the //TRANSLIT mode modify such behaviour and
allow the conversion to continue?"

Reproduce code:
Both of these fail on Linux but not windows:
$result = iconv("Shift_JIS", "Shift_JIS//TRANSLIT", $result);
$result = iconv("Shift-JIS", "Shift_JIS//TRANSLIT", $result);

$result contains the contents of this page:

the char it fail on is just after "<img src="./fight.gif" alt="

Expected result:
$result should be unchanged or contain valid Shift_JIS.

Actual result:
It returns part of $result, as if some char is causing it to stop processing.

i.e. the first 1000 bytes of $result are returned,the rest, around 6000 bytes, are missing.

the bytes where it stops have values
243, 164, 208 


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2008-01-28 23:57 UTC]
It's glibc/libiconv who returns the error.
We cannot fix or change that behavior.
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Tue Oct 19 10:03:36 2021 UTC