Original accented string=Test ├
After whitespace replacement, string=TestWHITESPACE├WHITESPACE
KNOWN ISSUE: preg_replace garbles the accent (becomes I think 0xFFFD?) in my version

Notice: Use of undefined constant pregRemoveAndRecord - assumed 'pregRemoveAndRecord' in C:\Programme\xampplite\htdocs\test.php on line 10
After preg_replace (with a /u PCRE option) on that garbled string, new string=
MEGA-GODAWFUL MISFEATURE: the garbled string blows up with the PHP /u (see discussion) and preg_ functions return empty string!!!

Repeat using /u (see PHP regex modifiers) in the first replacement.

Original accented string=Test ├
After whitespace replacement with /u modifier, string=

Notice: Use of undefined constant pregRemoveAndRecord - assumed 'pregRemoveAndRecord' in C:\Programme\xampplite\htdocs\test.php on line 21
After preg_replace on that string=

phpinfo()
PHP Logo

PHP Version 5.2.4


System Windows NT BART 5.1 build 2600
Build Date Aug 30 2007 07:05:48
Configure Command cscript /nologo configure.js "--enable-snapshot-build" "--with-gd=shared"
Server API Apache 2.0 Handler
Virtual Directory Support enabled
Configuration File (php.ini) Path C:\WINDOWS
Loaded Configuration File C:\Programme\xampplite\apache\bin\php.ini
PHP API 20041225
PHP Extension 20060613
Zend Extension 220060519
Debug Build no
Thread Safety enabled
Zend Memory Manager enabled
IPv6 Support enabled
Registered PHP Streams php, file, data, http, ftp, compress.zlib, zip
Registered Stream Socket Transports tcp, udp
Registered Stream Filters convert.iconv.*, string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, zlib.*

Zend logo This program makes use of the Zend Scripting Language Engine:
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies
    with Zend Debugger v5.2.10, Copyright (c) 1999-2007, by Zend Technologies

mb_get_info:
Array ( [internal_encoding] => ISO-8859-1 [http_input] => [http_output] => pass [func_overload] => 0 [func_overload_list] => no overload [mail_charset] => UTF-8 [mail_header_encoding] => BASE64 [mail_body_encoding] => BASE64 [illegal_chars] => 0 [encoding_translation] => Off [language] => neutral [detect_order] => Array ( [0] => ASCII [1] => UTF-8 ) [substitute_character] => 63 [strict_detection] => Off )