From:             [EMAIL PROTECTED]
Operating system: win32, Linux
PHP version:      4.1.2
PHP Bug Type:     ICONV related
Bug description:  ICONV transliteration failure

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 bug report at http://bugs.php.net/?id=16069&edit=1
-- 
Fixed in CVS:        http://bugs.php.net/fix.php?id=16069&r=fixedcvs
Fixed in release:    http://bugs.php.net/fix.php?id=16069&r=alreadyfixed
Need backtrace:      http://bugs.php.net/fix.php?id=16069&r=needtrace
Try newer version:   http://bugs.php.net/fix.php?id=16069&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=16069&r=support
Expected behavior:   http://bugs.php.net/fix.php?id=16069&r=notwrong
Not enough info:     http://bugs.php.net/fix.php?id=16069&r=notenoughinfo
Submitted twice:     http://bugs.php.net/fix.php?id=16069&r=submittedtwice

Reply via email to