Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:69981 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 20272 invoked from network); 31 Oct 2013 09:22:21 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 31 Oct 2013 09:22:21 -0000 Authentication-Results: pb1.pair.com smtp.mail=yohgaki@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=yohgaki@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.217.178 as permitted sender) X-PHP-List-Original-Sender: yohgaki@gmail.com X-Host-Fingerprint: 209.85.217.178 mail-lb0-f178.google.com Received: from [209.85.217.178] ([209.85.217.178:47003] helo=mail-lb0-f178.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 07/41-13434-C4122725 for ; Thu, 31 Oct 2013 04:22:21 -0500 Received: by mail-lb0-f178.google.com with SMTP id o14so2132517lbi.37 for ; Thu, 31 Oct 2013 02:22:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=JHw/FJyuEUke8WJKX2R5yZLjgg6nclcpPyUZbbHe4/A=; b=bJsoz+n+o6K7aC4wGloXTPnJb7l+yshFqU1LKc0x5P4ORJ8l3hPieqMKbVRAvZldrM W9WcbaCJ+MZlrvuAssxz+/0mqv0vBiPPn/9TTB+yRB1tzZ8gqtFRMLP9h3MpOESDxV5r W59qFKvvIZQwwvTFQV9/mrSwUw1GEyxF/l6XceUk0lD3xBfjm4S8B7rwWgylDQvDb4fl kw9Ux5Z3OC+T0OEu2fxpfJrJdPME3PH48RyJVIT6w5TXCjL+WEg2qYXVdvXdSRgl8RWm HkwGxjo4xIPln014gvPF+gkXjzJ+CwqcxRpu3DKsuppeUf4eP2e5VdVrq1E34yNo7epB UDiw== X-Received: by 10.112.157.98 with SMTP id wl2mr103840lbb.78.1383211337134; Thu, 31 Oct 2013 02:22:17 -0700 (PDT) MIME-Version: 1.0 Sender: yohgaki@gmail.com Received: by 10.112.154.201 with HTTP; Thu, 31 Oct 2013 02:21:37 -0700 (PDT) In-Reply-To: References: <526F98C1.4040607@php.net> <527212E9.7040201@php.net> <52721544.10106@php.net> Date: Thu, 31 Oct 2013 18:21:37 +0900 X-Google-Sender-Auth: jVxMac_DeVdUCZErBspepQOK0jM Message-ID: To: Joe Watkins Cc: "internals@lists.php.net" , Martin Keckeis Content-Type: multipart/alternative; boundary=001a11c344166638cb04ea05fc88 Subject: Re: [PHP-DEV] Re: [RFC] Use default_charset As Default Character Encoding From: yohgaki@ohgaki.net (Yasuo Ohgaki) --001a11c344166638cb04ea05fc88 Content-Type: text/plain; charset=UTF-8 Hi Joe, On Thu, Oct 31, 2013 at 6:07 PM, Yasuo Ohgaki wrote: > On Thu, Oct 31, 2013 at 5:31 PM, Joe Watkins wrote: > >> How could you override them ?? >> > > It's in PoC patch. > I made it while 5.5 was in beta, but it would work. > > >> If they are removed then they cannot be referenced. >> >> If they are not being removed then nothing is being simplified ... >> > > The most important objective is when you are using 'UTF-8' (I guess it's > standard today) > All you should do is > > default_charset='UTF-8' > > then PHP uses the setting anywhere it can apply. (e.g. htmlspecialchars, > mbstring functions, etc) > I have to work on functions, but php.ini related staff is in PoC patch. > I forgot to mention that it helps i18n applications also. For example, preg and sqlite only accepts UTF-8 as MBCS char. Users may write if (ini_get('default_charset') !== 'UTF-8') { $str = mb_convert_encoding($str, 'UTF-8'); } preg, sqlite function calls here. It simplifies things for sure. I'll add these in RFC later. Regards, -- Yasuo Ohgaki yohgaki@ohgaki.net --001a11c344166638cb04ea05fc88--