#41239 [NEW]: Special chars not handled as alpha numeric
| From: | rene dot stabingis at gmail dot com | Date: | Mon, 30 Apr 2007 10:21:27 +0000 |
| Subject: | #41239 [NEW]: Special chars not handled as alpha numeric | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-112077@lists.php.net to get a copy of this message | ||
From: rene dot stabingis at gmail dot com
Operating system: Linux 2.6.13.2 (Debian 3.1)
PHP version: 5.2.1
PHP Bug Type: *Regular Expressions
Bug description: Special chars not handled as alpha numeric
Description:
------------
This code should delete all non-alphanumeric signs (except spaces).
If you have latin special chars like "ü", on the linux machine they are
deleted. On a win environment using same php version they are kept as
alnum. The deb machine runs with ISO-8859-1 charset.
Reproduce code:
---------------
$somePhrase = 'i don\'t know why, but many people know über';
echo preg_replace('/[^[:alnum:][:space:]]/', '', $somePhrase);
Expected result:
----------------
i dont know why but many people know über
Actual result:
--------------
i dont know why but many people know ber
--
Edit bug report at http://bugs.php.net/?id=41239&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=41239&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=41239&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=41239&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=41239&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=41239&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=41239&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=41239&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=41239&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=41239&r=support
Expected behavior: http://bugs.php.net/fix.php?id=41239&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=41239&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=41239&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=41239&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=41239&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=41239&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=41239&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=41239&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=41239&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=41239&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=41239&r=mysqlcfg