|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #25849 regular expression on a UTF-8 string brakes this string
Submitted: 2003-10-13 07:02 UTC Modified: 2003-10-13 07:11 UTC
From: troublegum at woltlab dot de Assigned:
Status: Not a bug Package: PCRE related
PHP Version: 4CVS-2003-10-13 (stable) OS: Windows 2000 Pro SP4
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: troublegum at woltlab dot de
New email:
PHP Version: OS:


 [2003-10-13 07:02 UTC] troublegum at woltlab dot de
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
session.save_path = c:/winnt/temp/php4_sessions
session.use_trans_sid = 1

Reproduce code:

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


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Fri Jan 21 21:03:37 2022 UTC