> On 25 Nov 2014, at 08:33, Markus Fischer <mar...@fischer.name> wrote: > >> On 24.11.14 23:09, Andrea Faulds wrote: >> Good evening, >> >> Here’s a new RFC: https://wiki.php.net/rfc/unicode_escape > > I think the choice of \u{xx} is interesting, i.e. using '{' and '}'. > > Afaik, one of the current best practices is to use json_decode(), like so: > > $ cat test.php > <?php var_dump( json_decode( '"\u00c4"' ) ); > > $ php test.php > string(2) "Ä"
json_decode is an interesting workaround, but JSON suffers from JavaScript, where it got its syntax, having poor Unicode handling. JSON's Unicode escapes only allow BMP characters and, worse, non-BMP characters must be encoded using surrogate pairs. -- Andrea Faulds http://ajf.me/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php