Bug #16069 Updated: ICONV transliteration failure
| From: | derick@php.net | Date: | Sat, 25 May 2002 11:04:16 +0000 |
| Subject: | Bug #16069 Updated: ICONV transliteration failure | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-8503@lists.php.net to get a copy of this message | ||
ID: 16069
Updated by: derick@php.net
Reported By: readjust@deneb.freemail.ne.jp
-Status: Closed
+Status: Open
Bug Type: ICONV related
Operating System: win32, Linux
PHP Version: 4.1.2
New Comment:
User reports:
But I think this problem was not completely solved yet because
libiconv support code is still old.
I confirmed it by running my testing script I've shown in #16069 on the
binary
base on the latest cvs version.
I can only choose libiconv when I work with Windows PHP.
Or Should I wonder if the support was done ?
As far as I know, libiconv can handle errno even in its win32 port.
Thanks,
Moriyoshi Koizumi
Previous Comments:
------------------------------------------------------------------------
[2002-05-24 20:28:24] derick@php.net
This bug has been fixed in CVS. You can grab a snapshot of the
CVS version at http://snaps.php.net/. In case this was a
documentation
problem, the fix will show up soon at http://www.php.net/manual/.
In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites.
Thank you for the report, and for helping us make PHP better.
------------------------------------------------------------------------
[2002-03-15 03:21:44] readjust@deneb.freemail.ne.jp
Yes, I know I am a exception :) and most PHP user don't have to care
about this problem. Besides it seems that glibc ICONV can not handle
CP932 characters properly.
------------------------------------------------------------------------
[2002-03-14 20:56:46] yohgaki@php.net
I've fixed it whole ago for systems supports iconv in libc.
(Recent Linux/glibc is one of them)
For systems uses libiconv, there is problem still.
(I didn't fix problem with libiconv, since I don't use libiconv ;)
------------------------------------------------------------------------
[2002-03-14 09:40:57] readjust@deneb.freemail.ne.jp
conversion between CP932(a variant of Shift_JIS charset) and any
Japanese charset other than CP932 unexpectantly failed when
transliteration mode is specified like "EUC-JP//TRANSLIT" on the output
encoding and the transliteration requires some larger buffer than
strlen(input_buf) * sizeof(ucs4_t).
testing script:
<?php
for( $i = 0; $i < 20; ++$i ) {
print $i.":".iconv( "EUC-JP", "Shift_JIS", iconv( "CP932",
"EUC-JP//TRANSLIT", "abcd".str_repeat( "****", $i ) )
)."<BR>";
}
for( $i = 0; $i < 20; ++$i ) {
print $i.":".iconv( "EUC-JP", "Shift_JIS", iconv( "CP932",
"EUC-JP//TRANSLIT", "abcd".str_repeat( "++++", $i ) )
)."<BR>";
}
?>
where "****" is ONE character described as "SQUARE MIRIBAARU" (0x876D)
and "++++" is ONE character described as "SQUARE AARU" (0x8765) on
http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP932.TXT
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=16069&edit=1