On Wed, 30 Apr 2025, youkidearitai wrote:

> Hi, Internals
> 
> Oniguruma(鬼車) maintenance was ended on April 24, 2025.
> https://github.com/kkos/oniguruma
> This library uses mbregex in php-src.
> 
> There is forked library in Onigumo(鬼雲).
> https://github.com/k-takata/Onigmo
> 
> How do we do that?
> - Move to Onigumo
> - Stay in Oniguruma
> - Deprecate mbregex functions
> 
> I created issue in php-src too.
> https://github.com/php/php-src/issues/18467

Considering that (I hope/think) most developers have moved to UTF-8 for 
their encoding, how useful is it to have a separate (and 
not-comptible-with-PCRE) regular expression engine still?

I don't know how much oniguruma adds on top of PCRE, but PCRE also has 
had significant improvements for UTF-8 encoded strings since we first 
added mbstring/mbregex. 

Wouldn't a replacement for:

        mb_regex_encoding($fromEncoding);
        mb_ereg_match($pattern, $string);

be:

        pcre_match($patern, iconv($fromEncoding, 'UTF-8', $string));

cheers,
Derick

-- 
https://derickrethans.nl | https://xdebug.org | https://dram.io

Author of Xdebug. Like it? Consider supporting me: https://xdebug.org/support

mastodon: @derickr@phpc.social @xdebug@phpc.social

Reply via email to