Re: pecl/idn documentation

From: Date: Mon, 05 Jan 2009 23:33:46 +0000
Subject: Re: pecl/idn documentation
References: 1 2 3 4 5 6  Groups: php.doc 
Request: Send a blank email to phpdoc+get-969379957@lists.php.net to get a copy of this message
Hello Am Mon, 5 Jan 2009 09:32:58 +0100 schrieb "Hannes Magnusson" <hannes.magnusson@gmail.com>: ... > > // Cannot convert a domain name to ASCII that contains non-ASCII > > chars // but already starts with "xn--" > > $ascii = @idn_to_ascii("xn--".chr(0xC3).chr(0xA4), $errorcode); > > if ($ascii === false) { > > printf("Detected error %d: %s\n", > > $errorcode,idn_strerror($errorcode)); } > > > > The problem was that idn_to_ascii() prints E_USER_WARNING messages > > if errors occur. I found not other way to check the outcome of this > > That's fine. > If you are showcasing "failures" then add a comment above it like > // Will throw E_WARNING blabla.. > and optionally remember people to not have display_errors turned on in > production environments. Ok, I don't mind, attached are the diffs without @. bye, -christian-

Attachment: [text/x-patch] chammers-idn-v2-a.diff
Attachment: [text/x-patch] chammers-idn-v4-b.diff
« previous php.doc (#969379957) next »