Ivan Enderlin @ Hoa wrote:

> Le 24/11/2014 23:09, Andrea Faulds a écrit :
>> Good evening,
>>
>> Here’s a new RFC: https://wiki.php.net/rfc/unicode_escape
>>
>> It has a rationale section explaining why certain decisions were made,
>> that I’d recommend you read in full.
> Excellent RFC, thank you for this proposal.
> I would suggest this talk
> https://speakerdeck.com/mathiasbynens/hacking-with-unicode (you might
> already know) but interesting concepts and limitations of current
> Unicode implementations are mentioned.
> The usage of `\u{…}` fixes most limitations and I could not be more
> agree with that notation!

I don't see that the proposed \u{...} notation fixes any limitation.
Its only advantage would be slightly better readability opposed to
inserting the desired UTF-8 byte sequences as octal or hexadecimal
escapes.  For instance, all of the following would print Ä (in an UTF-8
context):

  echo "\u{00C4}";
  echo "\xC3\x84";
  echo "\303\204";

-- 
Christoph M. Becker


-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to