Re: What is the use of "unicode.semantics" in PHP 6?

From: Date: Fri, 06 Jul 2007 09:22:44 +0000
Subject: Re: What is the use of "unicode.semantics" in PHP 6?
References: 1 2 3 4 5 6 7 8 9 10 11 12 13  Groups: php.internals 
Request: Send a blank email to internals+get-30486@lists.php.net to get a copy of this message
>>> Unicode code points can be defined with \u, but PHP6 breaks existing >>> octal and hex escape sequences. > > I don't understand what this means... PHP6.0-200707060630 unicode.fallback_encoding => 'utf-8' => 'utf-8' unicode.filesystem_encoding => no value => no value unicode.http_input_encoding => 'utf-8' => 'utf-8' unicode.output_encoding => 'utf-8' => 'utf-8' unicode.runtime_encoding => 'utf-8' => 'utf-8' unicode.script_encoding => 'utf-8' => 'utf-8' unicode.semantics => On => On unicode.stream_encoding => UTF-8 => UTF-8 --- test.php --- <?php $string1 = "ą"; $string2 = "\xC4\x85"; var_dump($string1 == $string2) var_dump(preg_match("/[\240-\377]/",$string1)); var_dump(preg_match("/[\240-\377]/",$string2)); ?> --- ą is in utf-8 (latin small letter a with ogonek, latin extended-a range). It contains two bytes with 0xC4 0x85 values. Expected result and actual result for php 5.2.0: --- bool(true) int(1) int(1) --- "/[\240-\377]/" range should match 0xC4 byte. Actual result (PHP6): --- bool(false) int(0) int(1) ---

« previous php.internals (#30486) next »