I've been thinking about how to not force UTF-8 in PCRE for PHP 6, and
it's not that simple. This is mainly due to preg_replace(), because it
allows array() parameters that can contain mixed IS_UNICODE and
IS_STRING values. I hope you realize though, that in UTF-8 mode PCRE
does not care about POSIX locales, even in PHP 5.
By the way, I think ICU regexp extension, when implemented, will let
you match Portuguese characters in UTF-8 strings.
-Andrei
On Jan 25, 2007, at 9:07 AM, Nuno Lopes wrote:
But how do I match only portuguese letters? you'll (always) need posix
locales..
I don't think forcing preg_* function to utf-8 is a good idea, but
anyway I haven't looked enough to PHP 6 (yet) to produce a strong
opinion.
Nuno
Because with UTF-8, PCRE already knows the uppercase and lowercase
equivalents, without having to rely on the POSIX locales.
-Andrei
On Jan 25, 2007, at 7:24 AM, Pierre wrote:
On 1/25/07, Ilia Alshanetsky <[EMAIL PROTECTED]> wrote:
PCRE should operate in UTF-8 mode.
How does UTF-8 help to make it locale compliant?
--Pierre
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php