From:             jc at mega-bucks dot co dot jp
Operating system: Linux
PHP version:      4.3.3RC1
PHP Bug Type:     mbstring related
Bug description:  mb_convert_encoding "s" option does not work

Description:
------------
The s option in mb_convert_encoding should convert zen-kaku spaces to
han-kaku spaces, this does not work.

Reproduce code:
---------------
Input URI is words=24%BB%FE%B4%D6%A1%A1TIME

echo "<pre>1- $words<BR>";
$words = mb_convert_kana($words, "KV");
echo "2- $words<BR>";
/* this should turn all zen-kaku spaces (%A1%A1) into han-kaku spaces */
$words = mb_convert_kana($words, "sa");
echo "3- $words<BR>";

/*
 * urlencoding the string should turn all han-kaku spaces into + */
$words  = urlencode($words);
$aWords = split("\+",$words);
foreach($aWords as $word) {
  if ($word == "") continue;
  echo "4- $word<BR>";
  $w    = urldecode($word);
  echo "5- $w<BR>";
}


Expected result:
----------------
1- 24&#26178;&#38291;&#12288;TIME
2- 24&#26178;&#38291;&#12288;TIME
3- 24&#26178;&#38291; TIME
4- 24%BB%FE%B4%D6+TIME
5- 24&#26178;&#38291;
5- TIME

Actual result:
--------------
1- 24&#26178;&#38291;&#12288;TIME
2- 24&#26178;&#38291;&#12288;TIME
3- 24&#26178;&#38291;&#12288;TIME
4- 24%BB%FE%B4%D6%A1%A1TIME
5- 24&#26178;&#38291;&#12288;TIME

-- 
Edit bug report at http://bugs.php.net/?id=24835&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=24835&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=24835&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=24835&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=24835&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=24835&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=24835&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=24835&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=24835&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=24835&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=24835&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=24835&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=24835&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=24835&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=24835&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=24835&r=gnused

Reply via email to