ID: 31805 Updated by: [EMAIL PROTECTED] Reported By: gullevek at gullevek dot org -Status: Open +Status: Feedback Bug Type: mbstring related Operating System: gnu/linux PHP Version: 4.3.10 New Comment:
Thank you for this bug report. To properly diagnose the problem, we need a short but complete example script to be able to reproduce this bug ourselves. A proper reproducing script starts with <?php and ends with ?>, is max. 10-20 lines long and does not require any external resources such as databases, etc. If possible, make the script source available online and provide an URL to it here. Try to avoid embedding huge scripts into the report. Previous Comments: ------------------------------------------------------------------------ [2005-02-02 07:21:44] gullevek at gullevek dot org 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 this bug report at http://bugs.php.net/?id=31805&edit=1