Bug #78190 [Fbk->Nab]: mb_split now return false with ISO strings

From: Date: Thu, 20 Jun 2019 15:21:27 +0000
Subject: Bug #78190 [Fbk->Nab]: mb_split now return false with ISO strings
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-221420@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=78190&edit=1

 ID:                 78190
 Updated by:         nikic@php.net
 Reported by:        mvachette at adequasys dot com
 Summary:            mb_split now return false with ISO strings
-Status:             Feedback
+Status:             Not a bug
 Type:               Bug
 Package:            mbstring related
 Operating System:   Windows 10
 PHP Version:        7.2.19
 Assigned To:        sjon
 Block user comment: N
 Private report:     N

 New Comment:

The default encoding is UTF-8, use mb_regex_encoding() if you are working with something else.


Previous Comments:
------------------------------------------------------------------------
[2019-06-20 15:15:44] sjon@php.net

I cannot reproduce this, it seems to work pretty consistently: https://3v4l.org/QqYjC

------------------------------------------------------------------------
[2019-06-20 15:09:11] mvachette at adequasys dot com

Description:
------------
It seems that something changes in 7.2.18 when using mb_split on ISO string.

On at least 7.2.16 & 7.2.17, using this function with ISO encoding string containing accents
works fine.

On a new env with version 7.2.18, the same code now return "false" (new undocumented
behaviour)



Test script:
---------------
var_dump(mb_split('-', 'e-a'));
//works fine on any version

var_dump(mb_split('-', 'é-a'));
// works if string is UTF8 encoded
// return "false" with an ISO encoded string on PHP 7.2.18



------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=78190&edit=1


Thread (4 messages)

« previous php.bugs (#221420) next »