go to bug id or search bugs for
that's nice to generate domain names by form-input for serverconfigurations
but it's more or less useless to replace userland code like idna_convert-class without a option to convert the punnycode back to IDN for user-readable output
Add a Patch
Add a Pull Request
Did some digging and it looks like the old IDN2003 code didn't actually have a punycode->humanreadable API (Which is why it wasn't included when it was first implemented in PHP).
UTS46 does have such an API though, so it's perfectly reasonable to add at this point, but a couple consistency questions need to be thought through first:
1) Do we even include a $variant arg in the signature since we're not going to offer a 2003 variant.
2) If we include the arg for potential forward company and/or consistency with the existing APIs, do we make it default to the sensible UTS46 mode even though that differs from the existing to functions' default of IDNA2003?
3) Is it time to just switch the default of the to methods to be UTS46?
4) Would it be more expedient and far more cross-version to just reimplement the algorithm in native PHP and put it on packagist?
Basically... what's a simple request and a simple implementation (proof of concept is already working fine in my checkout) becomes a kinda sticky issue in practice.
I'll ask the mailing list about this once the spam protection stops having a fit about my emails.
dunno - what i am now using for years in several admin panels is http://idnaconv.net/index.html while i would like to get rid of as much as possible 3rd party userland code because sooner or later it breaks with future PHP versions like http://www.pchart.net/ did from 7.0 to 7.1
uhm that looks like a documentation problem because "idn_to_utf8" sounds more like about the difference is the output encoding but in fact it seems to translate back the punnycode generated width "idn_to_ascii"
[harry@srv-rhsoft:/mnt/data/downloads]$ php -r "echo idn_to_ascii('hüttenguide.at');"
[harry@srv-rhsoft:/mnt/data/downloads]$ php -r "echo idn_to_utf8('xn--httenguide-9db.at');"
> uhm that looks like a documentation problem because
> "idn_to_utf8" sounds more like about the difference is the
> output encoding but in fact it seems to translate back the
> punnycode generated width "idn_to_ascii"
The documentation appears to be rather clear about this:
* idn_to_ascii — Convert domain name to IDNA ASCII form.
* idn_to_utf8 — Convert domain name from IDNA ASCII to Unicode.
Unless I misunderstand the ticket, there is nothing to be