Re: Re: [php6] Unicode support, options?

From: Date: Fri, 14 Mar 2014 22:11:20 +0000
Subject: Re: Re: [php6] Unicode support, options?
References: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
Hi all,

On Fri, Mar 14, 2014 at 8:33 PM, Alexey Zakhlestin <[email protected]>wrote:

> > Nothing is wrong with it, PCRE has very good support for UTF-8 (including
> > character properties and extended grapheme clusters). Can we just
> deprecate
> > mb_ereg? It seems totally useless and just confuses people. If you want
> to
> > match regular expressions on non-UTF-8 just do a conversion beforehand
> (or
> > use a sane encoding right away, you know).
>
> Several years ago mb_ereg was slightly faster than pcre. It could have
> changed since then


Besides unneeded conversion is better to be avoided, we also should
consider the case encoding is broken some how. Conversion should fail or
replace broken bytes, but it changes original data.

Regards,

--
Yasuo Ohgaki
[email protected]


Thread (34 messages)

« previous php.internals (#73169) next »