Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:79152 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 54783 invoked from network); 25 Nov 2014 10:04:01 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 Nov 2014 10:04:01 -0000 Authentication-Results: pb1.pair.com smtp.mail=ajf@ajf.me; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=ajf@ajf.me; sender-id=pass Received-SPF: pass (pb1.pair.com: domain ajf.me designates 192.64.116.200 as permitted sender) X-PHP-List-Original-Sender: ajf@ajf.me X-Host-Fingerprint: 192.64.116.200 imap1-2.ox.privateemail.com Received: from [192.64.116.200] ([192.64.116.200:49606] helo=imap1-2.ox.privateemail.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F1/22-40624-01454745 for ; Tue, 25 Nov 2014 05:04:01 -0500 Received: from localhost (localhost [127.0.0.1]) by mail.privateemail.com (Postfix) with ESMTP id 5AD70B0008B; Tue, 25 Nov 2014 05:03:58 -0500 (EST) X-Virus-Scanned: Debian amavisd-new at imap1.ox.privateemail.com Received: from mail.privateemail.com ([127.0.0.1]) by localhost (imap1.ox.privateemail.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id RtiZ0dSriQGN; Tue, 25 Nov 2014 05:03:58 -0500 (EST) Received: from [137.50.28.227] (oa-res-28-227.wireless.abdn.ac.uk [137.50.28.227]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.privateemail.com (Postfix) with ESMTPSA id D7DC5B00094; Tue, 25 Nov 2014 05:03:57 -0500 (EST) References: <54743ECF.6010301@fischer.name> Mime-Version: 1.0 (1.0) In-Reply-To: <54743ECF.6010301@fischer.name> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Message-ID: Cc: "internals@lists.php.net" X-Mailer: iPhone Mail (12B435) Date: Tue, 25 Nov 2014 10:03:54 +0000 To: Markus Fischer Subject: Re: [PHP-DEV] [RFC] Unicode Escape Syntax From: ajf@ajf.me (Andrea Faulds) > On 25 Nov 2014, at 08:33, Markus Fischer wrote: >=20 >> On 24.11.14 23:09, Andrea Faulds wrote: >> Good evening, >>=20 >> Here=E2=80=99s a new RFC: https://wiki.php.net/rfc/unicode_escape >=20 > I think the choice of \u{xx} is interesting, i.e. using '{' and '}'. >=20 > Afaik, one of the current best practices is to use json_decode(), like so:= >=20 > $ cat test.php > =20 > $ php test.php > string(2) "=C3=84" json_decode is an interesting workaround, but JSON suffers from JavaScript, w= here it got its syntax, having poor Unicode handling. JSON's Unicode escapes= only allow BMP characters and, worse, non-BMP characters must be encoded us= ing surrogate pairs. -- Andrea Faulds http://ajf.me/=