Re: libidn2 extension for php
| From: | Sven Kowalski | Date: | Thu, 17 Nov 2011 10:29:27 +0000 |
| Subject: | Re: libidn2 extension for php | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 12 | Groups: | php.pecl.dev |
| Request: | Send a blank email to pecl-dev+get-8874@lists.php.net to get a copy of this message | ||
hi,
I tried this out. It's not that easy. On the latest Debian I tried the intl extension which can be installed by the package management. There I just can install ICU 4.6 which is automatically installed when I install the package php5-intl. Ok how I learned I need 4.8.x. So I installed ICU 4.8.1 and then I wanted to install the intl-extension by using the pecl package that can be downloaded from the pecl website. But this one can't be compiled. I use php 5.3.x. I read that there is a problem to compile intl with php 5.3.x. Just php 5.2 should be possible.
My colleague has an archlinux on his computer. This one has the ICU 4.8.1 as package. But we can't use such linux for a webserver. So we were not able to get the intl extension running with the IDNA2008 feature.
Cheers
Sven
Am 11.11.2011 11:33, schrieb Pierre Joye:
it is already implemented. We do nothing else than calling the underlying ICU API, which is the same for all IDNA specifications. Using 4.8.x should work fine. If it is not the case or the results are not what you expect, please report a bug to the ICU project to get it fixed or to see if that's actually correct. On Fri, Nov 11, 2011 at 11:10 AM, Sven Kowalski<sk01@planet-ic.de> wrote:hi, there is one question left for me. When will this new version of icu be implemented in php? Cheers Sven Am 11.11.2011 10:26, schrieb Pierre Joye:hi Sven! Thanks for posting a summary of your replies to the list, that will help to solve the last questions :) There are two different issues here, one technical, one legal. The legal one is that libidn2 is GPL, GPL licensed code or libraries cannot be used with PHP licensed code (like.. PHP itself). That's why we can't accept your extension. From a technical point of view, intl relies on ICU. Latest versions of ICU implements IDNA2008 (see http://icu-project.org/apiref/icu4c49m1/uidna_8h.html). That means that using their latest version will provide what you are looking for. If some cases do not work as expected, please report a bug there so it can be fixed quickly :) Cheers,On Fri, Nov 11, 2011 at 10:07 AM, Sven Kowalski<sk01@planet-ic.de> wrote:Hey all, sry I'm new at mailing lists so I didn't really know how it works. Now a polite colleague introduced me to this topic. In the past I just answered to Pierre. So let me say something about the problem we have in our company. We are an Internet Service Provider and we manage domains with an php application. Some of our customers want domains with an "ß". The old IDNA2003 standard transforms this into "ss". But the DENIC now says that a "ß" is a "ß". There is an small example for you: The website fußball.de is transformed into fussball.de. But you can register a domain at the DENIC with fußball.de. fußball.de should be tranformed that way to be confirmed with IDNA2008 xn--fuball-cta.de. Maybe the website behind is the same but the owner of these domains can be different. At the moment no browser supports this transformation. But we are sure in the future the browser will support this feature. We found a thread on the mozilla website which deals with that topic. https://bugzilla.mozilla.org/show_bug.cgi?id=479520 We have also the information from the DENIC that Firefox wants to support the IDNA2008 standard still this year. The IDNA2008 standard is NOT compatible with the IDNA2003 standard which is now implemented in the intl extension. So in the future there will be a need for such a transformation and we want you to give such a feature. These are the RFCs we realized for php: http://tools.ietf.org/html/rfc5890 http://tools.ietf.org/html/rfc5891 http://tools.ietf.org/html/rfc5892 http://tools.ietf.org/html/rfc5893 You also can see the extension working under the following website: http://pecl.p4.net/libidn2.php If you want to try out this extension you can find under: http://pecl.p4.net/download.htm Cheers Sven Am 08.11.2011 10:33, schrieb Pierre Joye:hi! can you please use reply-all so it will make it to the list? :) About the ss (and maybe other as well), for what I see it is covered by the 2003 RFC and the results returned by ICU are valid, as well as other libraries I tested against. As a next step I would suggest to drop a mail to the ICU mailing list (http://site.icu-project.org/) to ask if it is possible to change this behavior to fullful the 2003 RFC needs, if it is a valid change (I do not know all the details :). Cheers, On Tue, Nov 8, 2011 at 10:03 AM, Sven Kowalski<sk01@planet-ic.de> wrote:-- PECL development discussion Mailing List (http://pecl.php.net/) To unsubscribe, visit: http://www.php.net/unsub.phphi, we used the intl function with our apps before we developed the new extension. We started to develop the new one because the old one didn't support the "ß" I mentioned. We tried an example on the icu website that shows us the intl extension won't work with our needs. Here is the url with the example www.fußball.de for you: http://demo.icu-project.org/icu-bin/idnbrowser?t=www.fußball.de You can see that this URL is transformed into www.fussball.de. The DENIC says, that this URL has not to be changed. We know that the INDA 2003 and IDNA 2008 standards are not compatible with each other. That's why we wrote this extension. What we need is a php extension that converts a "ß" into punycode and not into "ss". Cheers Sven Kowalski Am 04.11.2011 22:27, schrieb Pierre Joye:hi, Let me clarify our points too. The full and current IDN specification is implemented already in ICU, which is used by intl's IDN functions. See http://site.icu-project.org/ for more in depth details. About your extension, as we won't prevent you to include it (there is no policy to prevent duplicated features), we can't accept extension against GPL library, like libidn2. Have you tried the intl function with your needs or apps? If you miss something, we can surely add it to the existing features, be in ICU or in intl. Gruss, On Fri, Nov 4, 2011 at 2:44 PM, Sven Kowalski<sk01@planet-ic.de> wrote:hi, ok I think I have to describe our problem again. We are an internet service provider. We register domains for our customers. So we need this extension to register domains like fußball.de. Actually browsers like firefox or internet explorer transform this into fussball.de. so they don't support this at the moment. The DENIC allows to register domains like fußball.de now. There might be a problem to surf to these site but you can register it. And there is now a difference between fussball.de and fußball.de. That's why we developed this extension. Cheers. Am 04.11.2011 12:00, schrieb Pierre Joye:hi, That's also why I said that the current pecl's idn extension is really not to be used. ICU supports IDNA 2008 and is kept up to date with any change or progress in this area. So any new features will be transparently available to our users via the intl's idn functions. Cheers, On Fri, Nov 4, 2011 at 7:49 AM, Sven Kowalski<sk01@planet-ic.de> wrote:hey, This one you describe just supports the IDNA 2003 standard. Now the DENIC wants to support the IDNA 2008 standard. So we developed this php-extension. Especially the german letter ß should be supported. This one becomes ss with IDNA2003. But the DENIC says now the ß is an ß. Cheers. Am 01.11.2011 11:34, schrieb Pierre Joye:hi, As this library is good, I wonder about the usage given: http://www.php.net/idn_to_utf8 http://www.php.net/idn_ to_ ascii which are available in our current stable branche. Also for older (and dead php) PHP versions, there was http://pecl.php.net/package/idn Cheers, On Tue, Nov 1, 2011 at 9:49 AM, Sven Kowalski<sk01@planet-ic.de> wrote:hey all, my name ist Sven Kowalski and I'm 23 years old. I'm a Master business informatics student and I work at the company Planet IC. During my work I wrote a php-extension which implements the IDNA2008 standard to php. We are an internet service provider and use a php framework to manage the domains of our customers. So we need the IDNA2008 standard to support the actual demand of the DENIC to support the LATIN SMALL LETTER SHARP S ( In Germany also know as the ß (eszett) ) in a domain. The still implemented idn_to_ascii function is insufficient for us, because it just support the IDNA2003 standard. To realize that php-extension we used the gnu libidn2. Gnu libidn2 has 4 RFCs which you can see under the following links. http://tools.ietf.org/html/rfc5890 http://tools.ietf.org/html/rfc5891 http://tools.ietf.org/html/rfc5892 http://tools.ietf.org/html/rfc5893 We would like to provide these extension to the php-world. So we hope for a positive reply. :-) You can see the extension in action and download it here: http://pecl.p4.net/ With best regards Sven Kowalski -- PECL development discussion Mailing List (http://pecl.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php