ID: 25849 Updated by: [EMAIL PROTECTED] Reported By: troublegum at woltlab dot de -Status: Open +Status: Bogus Bug Type: PCRE related Operating System: Windows 2000 Pro SP4 PHP Version: 4CVS-2003-10-13 (stable) New Comment:
Use 'u' modifier. http://www.php.net/manual/en/pcre.pattern.modifiers.php Previous Comments: ------------------------------------------------------------------------ [2003-10-13 07:02:33] troublegum at woltlab dot de Description: ------------ I want to perform a regular expression on a string to replace all whitespace and commas with one single space. But If the string is a UTF-8 string, this string will be broken. I was not able to reproduce this behavior on my DebianLinux/Apache1.3.28/PHP4.3.3 Server. It occurs only on my Windows 2000 machine. Server: Apache 1.3.28 PHP as Apache Module php.ini Settings that diff from php.ini-dist: display_startup_errors = On magic_quotes_gpc = Off doc_root = c:/dev/htdocs extension_dir = c:/dev/php-4.3.3dev/extensions/ upload_max_filesize = 6M extension=php_bz2.dll extension=php_gd2.dll extension=php_gettext.dll extension=php_mbstring.dll extension=php_pdf.dll extension=php_sockets.dll session.save_path = c:/winnt/temp/php4_sessions session.use_trans_sid = 1 Reproduce code: --------------- see http://webpm.woltlab.info/phpgroup/pcre_utf8.phps Please read also the comments on the regular expression I can provide more strings that will fail if it is necessary. Expected result: ---------------- 1) Coeur Déjà Pris 2) Coeur Déjà Pris Actual result: -------------- 1) Coeur Déjà Pris 2) Coeur Déj? Pris ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=25849&edit=1