Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:47214 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 92468 invoked from network); 13 Mar 2010 09:07:57 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 13 Mar 2010 09:07:57 -0000 Authentication-Results: pb1.pair.com smtp.mail=surfchen@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=surfchen@gmail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.222.178 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: surfchen@gmail.com X-Host-Fingerprint: 209.85.222.178 mail-pz0-f178.google.com Received: from [209.85.222.178] ([209.85.222.178:57146] helo=mail-pz0-f178.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A7/87-13686-BE55B9B4 for ; Sat, 13 Mar 2010 04:07:55 -0500 Received: by pzk8 with SMTP id 8so1907180pzk.29 for ; Sat, 13 Mar 2010 01:07:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=tU8StnR4xqvZzCVFu7JkNszQEORNu2cQug8/IhKEqwY=; b=RQn9BszKyue+nkADzdzXYNM9FBFzjMbYqDUc/0NmaY0r+chrfF+71HsC5r9VIDahm7 QmUg+Yqxw7zwQAFJl/oGIUz+fe53uqmIm+23+d07VRflvk4qA67gTiTF02BOlGw+zMm3 4QZZpLlB5UuUeYrkQV3DMExTd9Be+aNv5hjts= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=bwl/VcBScnl3eYnGOpQRQfuo3+rCBFryxXzRVn7r3Ed0LzhvQH3C/FfZxEYS/QKkPj I6m7xnlwZDG/pEaxKP1l0gvZRYy5nphL3iTcyrWuHXRAZRQxS4sdKHnEGZITrv0scjPc L5TNecwjaRz8Xfd/gX90WEQ0/I5ZBxqYoHmz0= MIME-Version: 1.0 Received: by 10.142.74.11 with SMTP id w11mr269704wfa.74.1268471269903; Sat, 13 Mar 2010 01:07:49 -0800 (PST) In-Reply-To: References: <4B9926E8.4080202@lerdorf.com> <7f3ed2c31003120958w7bd41059o88869669c6f5b0d9@mail.gmail.com> Date: Sat, 13 Mar 2010 17:07:49 +0800 Message-ID: <661d85d51003130107o7cf19012m7ce93f0147c7585a@mail.gmail.com> To: Derick Rethans Cc: Hannes Magnusson , Moriyoshi Koizumi , Rasmus Lerdorf , PHP Developers Mailing List Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [PHP-DEV] PHP 6 From: surfchen@gmail.com (Chen Ze) On Sat, Mar 13, 2010 at 2:34 AM, Derick Rethans wrote: > On Fri, 12 Mar 2010, Hannes Magnusson wrote: > >> On Fri, Mar 12, 2010 at 17:38, Moriyoshi Koizumi wrote: >> > I'd love to see my brand-new mbstring implementation in the release. >> > Dropping mbstring completely won't be any good because lots of >> > applications rely on it, but I don't really want to maintain the funky >> > library bundled with it. >> >> Thats actually one of the ideas we had on IRC. >> That mbstring patch and more ext/intl features should be enough to >> solve "the unicode problem". > > Sorry, but that is not true. intl and mbstring can provide functionality > to deal with UTF 8 string manipulation functions, they can not provide > proper Unicode support. Proper Unicode support is *not* only just > dealing with UTF-8 strings. Proper Unicode support includes dealing with > file streams, with different encodings, with localiztion, with sorting, > with locales, with formatting numbers. Offloading this to extensions > makes Unicode support an add-on hack, and not a language feature. I am > not saying that intl and mbstring aren't *useful*, but they definitely > do not solve "the unicode problem". > I think unicode should only care for string handling. Formatting numbers should not be the thing that unicode cares. Unicode is a standard for text, not for text or number formatting. Back to the days we don't have unicode, the number formatting have already existed. It even exists when computer was not invented. That is same for sorting. When we think about Unicode, we should think about those really related to Unicode,like file system. Number formatting and sorting are other things which intl cares. For the unicode, I think we should implement something like: $chars=new mchar($bytes,$bytes_encoding); echo $chars;//output encoding foreach ($chars as $char) { echo $char;//output single utf-16/utf-8 char (depends on default output encoding) } echo $chars->bytes('gbk'); $chars->outputEncoding('gbk'); echo $chars; ini_set('mchar_output_encoding','gbk'); echo $chars; ini_set('mchar_filesystem_encoding','gbk'); echo $chars->filepath(); > regards, > Derick > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > -- aka Surf Chen http://chenze.name/