Bug #79308 [Opn->Nab]: Unexpected length of unicode string returned

From: Date: Wed, 26 Feb 2020 14:53:46 +0000
Subject: Bug #79308 [Opn->Nab]: Unexpected length of unicode string returned
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-225733@lists.php.net to get a copy of this message
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)

« previous php.bugs (#225733) next »