Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:79536 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 59643 invoked from network); 10 Dec 2014 18:59:46 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 10 Dec 2014 18:59:46 -0000 Authentication-Results: pb1.pair.com header.from=ajf@ajf.me; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=ajf@ajf.me; spf=pass; 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:48238] helo=imap1-2.ox.privateemail.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B4/F5-29826-02898845 for ; Wed, 10 Dec 2014 13:59:46 -0500 Received: from localhost (localhost [127.0.0.1]) by mail.privateemail.com (Postfix) with ESMTP id 55D82B00094; Wed, 10 Dec 2014 13:59:42 -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 4Bww_36i49D4; Wed, 10 Dec 2014 13:59:42 -0500 (EST) Received: from oa-res-26-240.wireless.abdn.ac.uk (oa-res-26-240.wireless.abdn.ac.uk [137.50.26.240]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.privateemail.com (Postfix) with ESMTPSA id BBDCEB00092; Wed, 10 Dec 2014 13:59:41 -0500 (EST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.1 \(1993\)) In-Reply-To: Date: Wed, 10 Dec 2014 18:59:39 +0000 Cc: internals Content-Transfer-Encoding: quoted-printable Message-ID: <98ABD377-A37A-4F25-8550-3E7684F22FDC@ajf.me> References: To: Sara Golemon X-Mailer: Apple Mail (2.1993) Subject: Re: [PHP-DEV] [VOTE][RFC] Unicode Codepoint Escape Syntax From: ajf@ajf.me (Andrea Faulds) > On 10 Dec 2014, at 18:55, Sara Golemon wrote: >=20 > On Mon, Dec 8, 2014 at 3:51 PM, Andrea Faulds wrote: >> Please read through the RFC and cast your vote if you wish to do so: >>=20 >> https://wiki.php.net/rfc/unicode_escape >>=20 >> Voting starts today (2014-12-08) and ends in 10 days=E2=80=99 time = (2014-12-18). >>=20 > I was just updating my HHVM patch to match your PHP implementation and > an issue came up. The following code, which is valid in PHP5: >=20 > echo json_decode("\"ma\u00F1ana\""); >=20 > Will throw a fatal compiler error as "\u00F1" is an invalid unicode > escape sequence. Since this represents an unnecessary BC break, I'd > like to propose the error handling be modified to match \x, which is > to say: Pass the value through unmodified. I was wondering about that case. Previously, the patch just raised a = warning but let it through unmodified. But then old code would be = littered with warnings, and I felt it was better just to throw an error. = Part of the problem is that I=E2=80=99d rather mistakes in string = literals be caught at compile time, to prevent someone accidentally = echoing =E2=80=98\u00F1=E2=80=99 somewhere. A possible compromise might be to let =E2=80=98\u=E2=80=99 through but = not =E2=80=98\u{=E2=80=98. -- Andrea Faulds http://ajf.me/