# mbstring failures

- Thread: https://externals.io/message/55169
- Original archive: https://news-web.php.net/php.internals/55169
- Started by Stas Malyshev on 2011-09-04T05:13:04+00:00
- Messages: 1
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #55169 — Stas Malyshev — 2011-09-04T05:13:04+00:00

URL: https://externals.io/message/55169#55169

Hi!

In my tests, I have some test failures in mbstring extensions, namely:

Bug #28220 (mb_strwidth() returns wrong width values for some Hangul 
characters) 
[/Users/smalyshev/php-src/branches/PHP_5_4/ext/mbstring/tests/bug28220.phpt]
Bug #49536 (mb_detect_encoding() returns incorrect results when 
strict_mode is turned on) 
[/Users/smalyshev/php-src/branches/PHP_5_4/ext/mbstring/tests/bug49536.phpt]
Unicode standard conformance test (ill-formed UTF sequences.) 
[/Users/smalyshev/php-src/branches/PHP_5_4/ext/mbstring/tests/illformed_utf_sequences.phpt]

The `mb_strwidth()` returns 8085 instead of 8101.
The `mb_detect_encoding()` returns false for both utf-8 examples and as 
far as I can see in the code of mbfl_filt_ident_utf8() it is intended 
result - this sequence is not considered valid utf-8.
For the illformed sequences I see many sequences that are supposed to be 
empty strings be 0000003f0000003f0000003f0000003f0000003f0000003f or 
more 3f's of different lengths.

Could you please check it out and see why these are failing?
-- 
Stanislav Malyshev, Software Architect
SugarCRM: http://www.sugarcrm.com/
(408)454-6900 ext. 227
