Bug #6680 Updated: regexps (ereg*) ignores locale settings

From: Date: Fri, 31 Aug 2001 10:32:07 +0000
Subject: Bug #6680 Updated: regexps (ereg*) ignores locale settings
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-64784@lists.php.net to get a copy of this message
ID: 6680 Updated by: sander Reported By: mbravo@tag-ltd.spb.ru Status: Open Old Bug Type: *Regular Expressions Bug Type: Feature/Change Request Operating System: FreeBSD 4.1-RELEASE PHP Version: 4.0.1pl2 New Comment: Moved to feature request. Previous Comments: ------------------------------------------------------------------------ [2000-09-17 16:30:36] stas@php.net You may want to use PCRE extension - it supports locale settings. ------------------------------------------------------------------------ [2000-09-12 05:54:33] mbravo@tag-ltd.spb.ru <?php if(eregi("^[[:alnum:]]+$",$t1)) { printf("alnum<br>"); } else { printf("not alnum<br>"); } ?> when invoked with $t1=<some string in cyrillic koi8-r encoding> (example - "×ÁÓÑ") and correct locale settings (see below) prints "not alnum" while at the command line grep -E with the same input matches: ------- mbravo@tag-ltd:pages$ grep -E '[[:alnum:]]+' ×ÁÓÑ ×ÁÓÑ ------- PHP configured as - './configure' '--prefix=/opt/www' '--with-apxs=/opt/www/bin/apxs' '--with-mod_charset' '--with-mysql=/opt' '--with-pgsql=/opt' posix Revision $Revision: 1.17 $ LANG ru_RU.KOI8-R HTTP_ENV_VARS["LANG"] ru_RU.KOI8-R ------------------------------------------------------------------------ Edit this bug report at http://bugs.php.net/?id=6680&edit=1

« previous php.dev (#64784) next »