#31805 [NEW]: first kanji count 6 characters more than it should
| From: | gullevek at gullevek dot org | Date: | Wed, 02 Feb 2005 06:21:44 +0000 |
| Subject: | #31805 [NEW]: first kanji count 6 characters more than it should | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-73235@lists.php.net to get a copy of this message | ||
From: gullevek at gullevek dot org
Operating system: gnu/linux
PHP version: 4.3.10
PHP Bug Type: mbstring related
Bug description: first kanji count 6 characters more than it should
Description:
------------
If you want to get a string length of a string with japanese kanji, then
with 4.3.10 the first kanji counts 8 characters instead of 2. Any other
double byte character afterwards is counted as 2 bytes.
The problem is, mb_strlen should return only 1 and not 2. If I could with
strlen there should be 2.
I get the wrong return with all ways. With no default charset set, with
default charset set, with giving charsets on the mb_strlen function,
getting it via the mb_detect_encoding. It always returns the wrong
length.
This was not in versions before 4.3.10.
--
Edit bug report at http://bugs.php.net/?id=31805&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=31805&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=31805&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=31805&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=31805&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=31805&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=31805&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=31805&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=31805&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=31805&r=support
Expected behavior: http://bugs.php.net/fix.php?id=31805&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=31805&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=31805&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=31805&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=31805&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=31805&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=31805&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=31805&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=31805&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=31805&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=31805&r=mysqlcfg