Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:78097 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 6778 invoked from network); 15 Oct 2014 15:11:18 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 Oct 2014 15:11:18 -0000 Authentication-Results: pb1.pair.com header.from=aleksey.tulinov@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=aleksey.tulinov@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.212.175 as permitted sender) X-PHP-List-Original-Sender: aleksey.tulinov@gmail.com X-Host-Fingerprint: 209.85.212.175 mail-wi0-f175.google.com Received: from [209.85.212.175] ([209.85.212.175:51489] helo=mail-wi0-f175.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 12/A6-03764-59E8E345 for ; Wed, 15 Oct 2014 11:11:18 -0400 Received: by mail-wi0-f175.google.com with SMTP id d1so13250438wiv.14 for ; Wed, 15 Oct 2014 08:11:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=J1T9rOLOHF5Zu6MfVglfgHBf1WxWd2XazJCxNUJe2QA=; b=Zt5BEdGF2EImH/mpwttFsgk7DFhmqb92GteJp0+cggUsJ+ZOtA+jtAuNIIfSeVVsSf PGJJkIQaZJc9cf1exbpcLoJRvHJoiSH3JU3FCafflC0qe8VMBaWvJcS/B765Fo5lrtQ3 sVXXH1TJTILyHAs3WovbFE+smPWYKNpX8mw28XYXzuDg+XRg5wxgPDIvFoxrnPXBfKRX 36v4KYvCXdAZB/1JHMEUfw1V8pT58aBZecAOMiVV+TLVcpfkbh7eHh89qH8c84I5e3fx M5aYqqKml7iMLafWAg2rBHRImszZJ8UOF40j7g8oowIi/YQhsPMJ4huVaUfATwUsQw8f 7vwQ== X-Received: by 10.180.101.200 with SMTP id fi8mr12816133wib.77.1413385875514; Wed, 15 Oct 2014 08:11:15 -0700 (PDT) Received: from [172.16.0.137] ([195.177.73.61]) by mx.google.com with ESMTPSA id ko10sm12835110wjb.48.2014.10.15.08.11.14 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 15 Oct 2014 08:11:14 -0700 (PDT) Message-ID: <543E8E91.7070805@gmail.com> Date: Wed, 15 Oct 2014 18:11:13 +0300 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.1.2 MIME-Version: 1.0 To: internals@lists.php.net References: <543CE705.7030203@gmail.com> <4575A816-43F4-462D-8150-A2D35516D914@ajf.me> <543D64E5.8000706@gmail.com> <543D8528.1060605@gmail.com> <543D8FFA.8080408@gmail.com> <543DAA29.8040701@gmail.com> <68E97150-8840-4C31-B271-3E8C8BE933DB@gmail.com> <543E4626.3000102@gmail.com> <543E6F6E.8080006@gmail.com> In-Reply-To: <543E6F6E.8080006@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [PHP-DEV] Unicode support From: aleksey.tulinov@gmail.com (Aleksey Tulinov) On 15/10/14 15:58, Rowan Collins wrote: Rowan, >> What is confusing me is that i think you're seeing it as a major >> implementation defect. To avoid arguable implementations, i've made >> short example in Java: >> >> System.out.println(new StringBuffer("noël").reverse().toString()); >> >> It does produce string "l̈eon" as i would expect. > > Why do you expect that? Is this a result which would ever be useful? > I think expect it to work this way because i know that this is a good trade-off between performance and produced result. It also leaves a possibility to do it better if i need to. > To be clear, I am suggesting that we aim to be the language which gets > this right, where other languages get it wrong. > Thank you for explaining this. I also think it could do better. I think Unicode-aware strrev() shouldn't be too complicated to do.