Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:58888 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 23555 invoked from network); 12 Mar 2012 19:52:01 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 12 Mar 2012 19:52:01 -0000 Authentication-Results: pb1.pair.com smtp.mail=smalyshev@sugarcrm.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=smalyshev@sugarcrm.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain sugarcrm.com designates 67.192.241.173 as permitted sender) X-PHP-List-Original-Sender: smalyshev@sugarcrm.com X-Host-Fingerprint: 67.192.241.173 smtp173.dfw.emailsrvr.com Linux 2.6 Received: from [67.192.241.173] ([67.192.241.173:51549] helo=smtp173.dfw.emailsrvr.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 3B/D1-13375-6C35E5F4 for ; Mon, 12 Mar 2012 14:51:35 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp7.relay.dfw1a.emailsrvr.com (SMTP Server) with ESMTP id 0E1612583B5; Mon, 12 Mar 2012 15:51:32 -0400 (EDT) X-Virus-Scanned: OK Received: by smtp7.relay.dfw1a.emailsrvr.com (Authenticated sender: smalyshev-AT-sugarcrm.com) with ESMTPSA id B4B512583B2; Mon, 12 Mar 2012 15:51:31 -0400 (EDT) Message-ID: <4F5E53C3.8060502@sugarcrm.com> Date: Mon, 12 Mar 2012 12:51:31 -0700 Organization: SugarCRM User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:10.0.1) Gecko/20120208 Thunderbird/10.0.1 MIME-Version: 1.0 To: Rasmus Lerdorf CC: PHP internals References: <4F5D9C77.3030000@lerdorf.com> <4F5DA152.10109@sugarcrm.com> <4F5DA894.8060606@lerdorf.com> <4F5DAB49.3030808@sugarcrm.com> <4F5DAFCE.8020600@lerdorf.com> <4F5E5148.4030106@sugarcrm.com> <4F5E5219.7080501@lerdorf.com> In-Reply-To: <4F5E5219.7080501@lerdorf.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] default charset confusion From: smalyshev@sugarcrm.com (Stas Malyshev) Hi! > But you can't necessarily hardcode the encoding if you are writing > portable code. That's a bit like hardcoding a timezone. In order to > write portable code you need to give people the ability to localize it. No, it's not like timezone at all. I have to support all timezones in a global app, but I don't have to internally support every encoding on Earth - having everything internally in UTF-8 works quite well, and a lot of applications do exactly that - they have everything internally in UTF-8 and only may convert when importing or exporting the data. I don't see anything in using UTF-8 throughout the app/library that makes it non-portable. However, if we allow to change defaults in htmlspecialchars() etc. that essentially makes having defaults useless as I'd have so explicitly specify UTF-8 each time - otherwise it's a gamble what encoding I'd actually get. -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227