ID:               41239
 User updated by:  rene dot stabingis at gmail dot com
 Reported By:      rene dot stabingis at gmail dot com
 Status:           Bogus
 Bug Type:         *Regular Expressions
 Operating System: Linux 2.6.13.2 (Debian 3.1)
 PHP Version:      5.2.1
 New Comment:

I'm sorry but setlocale(LC_ALL, 'de_DE'); has no effect. Same with an
explicit set of the german or german/european charset. (btw same
behaviour on a freebsd4 machine)
Until now i have only seen problems with this on ubuntu machines
running with utf8 standard charset


Previous Comments:
------------------------------------------------------------------------

[2007-04-30 10:46:50] [EMAIL PROTECTED]

You need to use the correct locale, see setlocale() documentation.

------------------------------------------------------------------------

[2007-04-30 10:21:25] rene dot stabingis at gmail dot com

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 this bug report at http://bugs.php.net/?id=41239&edit=1

Reply via email to