#43672 [Opn->Bgs]: Linux fails with iconv("Shift_JIS", "Shift_JIS//TRANSLIT", $result);

From: Date: Mon, 28 Jan 2008 23:57:18 +0000
Subject: #43672 [Opn->Bgs]: Linux fails with iconv("Shift_JIS", "Shift_JIS//TRANSLIT", $result);
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-121661@lists.php.net to get a copy of this message
ID: 43672 Updated by: tony2001@php.net Reported By: parkinson at fm-net dot ne dot jp -Status: Open +Status: Bogus Bug Type: ICONV related Operating System: Linux PHP Version: 5.2.5 New Comment: It's glibc/libiconv who returns the error. We cannot fix or change that behavior. Previous Comments: ------------------------------------------------------------------------ [2007-12-25 03:43:37] parkinson at fm-net dot ne dot jp Description: ------------ 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: http://www.seodayo.com/lint/htmllint.cgi?URL=http%3A%2F%2Fwww.e-food.jp%2F 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 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=43672&edit=1

« previous php.bugs (#121661) next »