Edit report at http://bugs.php.net/bug.php?id=6680&edit=1
ID: 6680 Updated by: johan...@php.net Reported by: mbravo at tag-ltd dot spb dot ru Summary: regexps (ereg*) ignores locale settings -Status: Open +Status: Bogus Type: Feature/Change Request -Package: Feature/Change Request +Package: *General Issues Operating System: FreeBSD 4.1-RELEASE PHP Version: 4.0.1pl2 Block user comment: N New Comment: ereg is deprecated in favor of preg Previous Comments: ------------------------------------------------------------------------ [2001-08-31 06:32:07] san...@php.net Moved to feature request. ------------------------------------------------------------------------ [2000-09-17 16:30:36] s...@php.net You may want to use PCRE extension - it supports locale settings. ------------------------------------------------------------------------ [2000-09-12 05:54:33] mbravo at tag-ltd dot spb dot 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: ------- mbr...@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/bug.php?id=6680&edit=1