Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:78217 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 9511 invoked from network); 22 Oct 2014 07:48:12 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Oct 2014 07:48:12 -0000 Authentication-Results: pb1.pair.com header.from=rowan.collins@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=rowan.collins@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.42 as permitted sender) X-PHP-List-Original-Sender: rowan.collins@gmail.com X-Host-Fingerprint: 74.125.82.42 mail-wg0-f42.google.com Received: from [74.125.82.42] ([74.125.82.42:46976] helo=mail-wg0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 47/B0-01590-A3167445 for ; Wed, 22 Oct 2014 03:48:11 -0400 Received: by mail-wg0-f42.google.com with SMTP id z12so3075978wgg.13 for ; Wed, 22 Oct 2014 00:48:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type:subject:from:date:to:cc :message-id; bh=YBHTxNzZLaeq34wNKNqTFvvKxDK4bG7MCj54eBsM/wo=; b=JKX1VGnvkJja+qLtfSvwp0PW9MzDL09Av6u78t+M7vmDJxgXGggwGNWMAmOsoNRIqd T5FFIkU4RHzRURv3YVyRcHKdnw5wBrsFJlBo/qWy1aBIq4Nz8zyJxg9oOVf3Tlg5ygfw Y9WmAbJCJCE+pbpaYixgK/iLrQGnjrBoMqk4L0jupweY71pYF1+Iofzy6iKx0X0DkFD5 8XjL1zCJtSbSSUdOZcJLjs4G2PXd5hP42rX76hTPyfapay7tWjUehfI5yxGTfWZQavAp E9p2ktfdO8XljQahLR6fIKly8pMsSJFLpKc9vFZUNcgMn3+SC3/U1Dfa/p71TpX8SE42 ugyw== X-Received: by 10.180.207.6 with SMTP id ls6mr36263775wic.28.1413964088114; Wed, 22 Oct 2014 00:48:08 -0700 (PDT) Received: from [192.168.0.3] (cpc68956-brig15-2-0-cust215.3-3.cable.virginm.net. [82.6.24.216]) by mx.google.com with ESMTPSA id d3sm957021wix.5.2014.10.22.00.47.57 for (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 22 Oct 2014 00:47:57 -0700 (PDT) User-Agent: K-9 Mail for Android In-Reply-To: <2EAD2B07-1469-440B-9843-BB1D5CD56E68@ajf.me> References: <1413875212.2624.3.camel@localhost.localdomain> <5446C552.2080702@gmail.com> <2EAD2B07-1469-440B-9843-BB1D5CD56E68@ajf.me> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Date: Wed, 22 Oct 2014 08:46:52 +0100 To: Andrea Faulds CC: internals@lists.php.net Message-ID: <084F0AF2-20AC-4F51-B8C2-C8695B0C8530@gmail.com> Subject: Re: [PHP-DEV] [RFC] UString From: rowan.collins@gmail.com (Rowan Collins) On 21 October 2014 23:21:37 GMT+01:00, Andrea Faulds wrote: > >> On 21 Oct 2014, at 21:42, Rowan Collins >wrote: >> >> The only case I can see where a default encoding would be sensible >would be where source code itself is in a different encoding, so that >u('literal string') works as expected. > >This is only a good idea if we can somehow make it file-local. >Otherwise if one library uses Latin-1 and another uses UTF-8 for some >reason, bang! Yes, I used the word "declared" advisedly, because I was thinking it could take its default encoding (if we were to go down the route of special literal syntax rather than wrapper-function) from the existing declare(encoding='...') directive, rather than a global variable or setting. http://php.net/manual/en/control-structures.declare.php#control-structures.declare.encoding