Bug #79308 [Opn->Nab]: Unexpected length of unicode string returned
Edit report at https://bugs.php.net/bug.php?id=79308&edit=1
ID: 79308
Updated by: cmb@php.net
Reported by: dpiekarski at dompie dot de
Summary: Unexpected length of unicode string returned
-Status: Open
+Status: Not a bug
Type: Bug
Package: *Unicode Issues
Operating System: Ubuntu 18.04.4 LTS
PHP Version: 7.4.3
-Assigned To:
+Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
This is not related to the PHP version; e.g. PHP 7.3 with ICU
66.0.1 prints int(3) as well, so it's obviously an upstream issue.
नमसà¥à¤¤à¥
Previous Comments:
------------------------------------------------------------------------
[2020-02-26 12:50:25] dpiekarski at dompie dot de
Description:
------------
Getting the grapheme_strlen() of the string 'नमसà¥à¤¤à¥' returns
3 instead of expecting 4.
ICU version 65.1
ICU Data version 65.1
ICU TZData version 2019c
ICU Unicode version 12.1
iconv library version => 2.27
On another system (Debian 10) with PHP7.3 and
ICU version => 63.1
ICU Data version => 63.1
ICU TZData version => 2018e
ICU Unicode version => 11.0
iconv library version => 2.28
it works as expected.
Test script:
---------------
<?php
$word = 'नमसà¥à¤¤à¥';
var_dump(grapheme_strlen($word));
Expected result:
----------------
int(4)
Actual result:
--------------
int(3)
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=79308&edit=1
Thread (4 messages)