From: j dot hakvoort at publiceren dot net
Operating system: Linux
PHP version: 4.4.4
PHP Bug Type: *General Issues
Bug description: PHP can't read UTF-8 encoded PHP code
Description:
------------
Hi!
I've been working on the encoding issue to make a site compatible for any
language, but the problem is that when you print special characters in PHP
it will be malformed.
So the advice I received is to encode the PHP code to UTF-8, but when I do
this however the script will fail because PHP doesn't read UTF-8 encoded
PHP code!
Is this a bug? I am using 4.4.4
Best Regards,
Jan Jaap Hakvoort
Reproduce code:
---------------
<?php
$str = 'éúïäç Ä';
$match = preg_match('¡[ ]+¡',$str);
?>
Expected result:
----------------
$match will be set to true.
Actual result:
--------------
PHP error, unexpected character [block]...
--
Edit bug report at http://bugs.php.net/?id=39244&edit=1
--
Try a CVS snapshot (PHP 4.4):
http://bugs.php.net/fix.php?id=39244&r=trysnapshot44
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=39244&r=trysnapshot52
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=39244&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=39244&r=fixedcvs
Fixed in release:
http://bugs.php.net/fix.php?id=39244&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=39244&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=39244&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=39244&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=39244&r=support
Expected behavior: http://bugs.php.net/fix.php?id=39244&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=39244&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=39244&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=39244&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=39244&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=39244&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=39244&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=39244&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=39244&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=39244&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=39244&r=mysqlcfg