Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:63715 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 92380 invoked from network); 30 Oct 2012 08:42:25 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 30 Oct 2012 08:42:25 -0000 Authentication-Results: pb1.pair.com header.from=glopes@nebm.ist.utl.pt; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=glopes@nebm.ist.utl.pt; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain nebm.ist.utl.pt from 193.136.128.21 cause and error) X-PHP-List-Original-Sender: glopes@nebm.ist.utl.pt X-Host-Fingerprint: 193.136.128.21 smtp1.ist.utl.pt Linux 2.6 Received: from [193.136.128.21] ([193.136.128.21:58386] helo=smtp1.ist.utl.pt) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 9B/B7-31721-DE29F805 for ; Tue, 30 Oct 2012 03:42:22 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp1.ist.utl.pt (Postfix) with ESMTP id 5939E700044A for ; Tue, 30 Oct 2012 08:42:18 +0000 (WET) X-Virus-Scanned: by amavisd-new-2.6.4 (20090625) (Debian) at ist.utl.pt Received: from smtp1.ist.utl.pt ([127.0.0.1]) by localhost (smtp1.ist.utl.pt [127.0.0.1]) (amavisd-new, port 10025) with LMTP id 2nh-qq8jxpGu for ; Tue, 30 Oct 2012 08:42:18 +0000 (WET) Received: from nebm.ist.utl.pt (unknown [IPv6:2001:690:2100:4::58:1]) by smtp1.ist.utl.pt (Postfix) with ESMTP id 21B027000428 for ; Tue, 30 Oct 2012 08:42:17 +0000 (WET) Received: from localhost ([127.0.0.1] helo=nebm.ist.utl.pt) by nebm.ist.utl.pt with esmtp (Exim 4.72) (envelope-from ) id 1TT7Or-0005Cu-QX for internals@lists.php.net; Tue, 30 Oct 2012 08:42:17 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Date: Tue, 30 Oct 2012 09:42:17 +0100 To: Organization: =?UTF-8?Q?N=C3=BAcleo_de_Engenharia_Biom=C3=A9dica_do_Insti?= =?UTF-8?Q?tuto_Superior_T=C3=A9cnico?= In-Reply-To: References: Message-ID: X-Sender: glopes@nebm.ist.utl.pt User-Agent: RoundCube Webmail/0.8-rc Subject: Re: [PHP-DEV] [RFC] ICU UConverter implementation for ext/intl From: glopes@nebm.ist.utl.pt (Gustavo Lopes) Em 2012-10-30 2:57, Sara Golemon escreveu: > http://wiki.php.net/rfc/uconverter > > Discuss! Good work. I do, however, have some concerns: * Error handling is done in a different way from the rest of the extension. Error handling in ext/intl is, admittedly, a little strange. Errors are both stored globally (to be retrieved by intl_get_error_code() and intl_get_error_message()) and in the object that raised them (through ::getErrorCode() and ::getErrorMessage()). The mechanism in ICU where one can do several calls in succession and check the error code only at the end is broken; the error codes are reset at the start of each call. The errors may raise any kind of PHP error (depending on the value of a INI setting, intl.error_level) or an exception (activated globally via intl.use_exceptions). On failure, functions/methods return false (constructors and factory methods return null). Unusual as this may be, it would be a bad idea to introduce inconsistency here. See the implementations in the other modules. * The tests have poor coverage. -- Gustavo Lopes