|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2003-09-26 08:20 UTC] svs at ropnet dot ru
Description:
------------
Even though locale is set up correctly, eregi() fails to match international characters case-insensitively. The reason, as far
as I understand, is that code in regex/ passes a negative value to isalpha(). This can be worked around by recompiling regex/regcomp.c manually with -funsigned-char (assuming GCC is the compiler).
Reproduce code:
---------------
<?php
setlocale(LC_ALL, "ru_RU.KOI8-R");
echo setlocale(LC_ALL, ""), "\n";
if (eregi("я", "ЯЯ")) { echo "ok\n"; } else { echo "bad\n";}
if (preg_match("/я/i", "ЯЯ")) { echo "ok\n"; } else { echo "bad\n";}
?>
Expected result:
----------------
ru_RU.KOI8-R
ok
ok
Actual result:
--------------
ru_RU.KOI8-R
bad
ok
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 22:00:01 2025 UTC |
oops, mozilla mangled those characters. begin 644 l.php M/#]P:'`*<V5T;&]C86QE*$Q#7T%,3"P@(G)U7U)5+DM/23@M4B(I.R`*96-H M;R!S971L;V-A;&4H3$-?04Q,+"`B(BDL(")<;B(["FEF("AE<F5G:2@BT2(L M("+Q\2(I*2![(&5C:&\@(F]K7&XB.R!](&5L<V4@>R!E8VAO(")B861<;B([ M?0II9B`H<')E9U]M871C:"@B+]$O:2(L("+Q\2(I*2![(&5C:&\@(F]K7&XB =.R!](&5L<V4@>R!E8VAO(")B861<;B([?0H_/@H` ` end './configure' '--without-x' '--disable-debug' '--with-apxs=/usr/local/apache/bin/apxs' '--with-mod_charset' '--enable-dba' '--with-gdbm=/usr/local' '--with-db4=/usr/local' '--enable-dbase' '--enable-ftp' '--enable-sockets' '--enable-inline-optimization' '--enable-memory-limit' '--with-mysql' '--with-gd' '--enable-gd-native-ttf' '--with-zlib=/usr' '--with-jpeg-dir=/usr/local' '--with-png-dir=/usr/local' '--with-freetype-dir=/usr/local' '--enable-exif' '--enable-calendar' '--enable-wddx' '--with-gmp' '--with-openssl=/usr' '--with-iconv=/usr/local' '--with-imap=shared,/usr/local' '--with-curl=/usr/local' '--with-dom=shared,/usr/local' '--with-dom-xslt=shared,/usr/local' '--with-dom-exslt=shared,/usr/local' '--enable-xslt=shared' '--with-xslt-sablot=shared,/usr/local' '--with-iconv-dir=/usr/local' '--with-expat-dir=/usr/local' '--with-zip=/usr/local' '--with-pdflib' '--with-tiff-dir=/usr/local'