Hey,
This feature request came to my mind as our company registered a few IDN domains. I'd like to add that IDN domains are a thing now, and should be supported in Aegir so I thought why not.
I created a simple script to convert between Unicode and Ascii with the "Add a site" feature, I'd love to see this in the core but I couldn't get hosting.inc to match the domains :\ I guess the problem is with the domains containing multiple dash's? So as in RFC the domains would be served in the databases and config files in their respected ascii equivalent.
ääkköset.fi <-> xn--kkset-fraa0m.fi
Please see the attached patch proposal for hosting_site.form.js to target converting of the domain names with change of the input fields focus.
Comment | File | Size | Author |
---|---|---|---|
#14 | 0001-IDN-domain-names-on-the-fly-conversion.patch | 1.28 KB | omega8cc |
#13 | idna_convert.jpg | 1.11 MB | omega8cc |
hosting_site.form_.js_.diff | 3.25 KB | Aciid |
Comments
Comment #1
omega8cc CreditAttribution: omega8cc commentedNote that stock Aegir supports
xn--
format without issues. If you are experiencing problems with it, you are most probably using BOA and there was a bug I just fixed: http://drupalcode.org/sandbox/omega8cc/1074912.git/commit/27bc110Thanks for the heads up!
As for the inclusion of the on-the-fly converter, I will leave this for other core devs to decide and I'm changing the title to match the real request here, as the bug was elsewhere.
Comment #2
Aciid CreditAttribution: Aciid commentedYeah we use BOA servers thanks for clarifying that the bug was not in Aegir. (Actually I should have had checked that myself by comparing vanilla installation before coming here).
Thanks!
Comment #3
anarcat CreditAttribution: anarcat commentedSorry, but we need an non-obfuscated version of this code before we even consider reviewing it.
Comment #4
omega8cc CreditAttribution: omega8cc commentedOriginal code is here: https://github.com/bestiejs/punycode.js/blob/master/punycode.js
Comment #5
Anonymous (not verified) CreditAttribution: Anonymous commentedJust wanted to add (perhaps this is obvious) that BOA 2.0.5 (current stable version - before applying omega8.cc's fix) also prevents IDN's from displaying the www. version of the IDN BOA-hosted site. Aegir can't save the alias. Thanks for the fix - I just wanted to make sure the fix also addresses this issue, which I believe is the same.
Comment #6
omega8cc CreditAttribution: omega8cc commented@EdNet - good catch - fixed in http://drupalcode.org/sandbox/omega8cc/1074912.git/commit/a38aa1b
Comment #7
anarcat CreditAttribution: anarcat commentedThis looks like a rather big blob of Javascript code to be included here only for a rather exceptionnal (at least now) use case (having *on the fly* conversion). I think we would be better served by regular form processing here - we could send the IDN form to the backend and keep the frontend readable, couldn't we?
And anyways, we do need to have a patch that would include that .js code somewhere... If we are to embed alien JS code in Aegir, we should be careful about licenses, attributions and so on. We also should include it as a separate file.
But I personnally believe this to be overkill. If there are no other solutions proposed, however, who am I to refuse! :)
Comment #8
Aciid CreditAttribution: Aciid commentedHi, I just picked this email again from my inbox.
Surely this is not even a priority and as a feature can be stashed because as a functionality it's so trivial. Only reason why I made it was because I thought it could be fun to code.
In fact the my co-workers asked me in in the scope of the subject "How do I even add IDN-domains to Aegir or our DNS?"
Thats when I explained how I haven't seen this kind of functionality anywhere else. It's serves more as a trifling way to pronounce domains in native language. And the browser converts them to ascii, the IDN version is still visible to user, all communications is being spoken via ascii version of the domain.
Conclusion: "So I have to google 'IDN convert' everytime I wan't to add IDN domains to our Aegir or DNS?" Yeah.
But hey, ths thread has given me quite a insight of how to think my commit's further and maybe try and sharpen them up a bit before trying to release.
As for the licensing of punycode.js part "Punycode.js is dual licensed under the MIT and GPL licenses." Authored by: http://mathiasbynens.be/
Source fork can be found still from github: https://github.com/bestiejs/punycode.js/
Comment #9
TR CreditAttribution: TR commentedAdded IDN tag.
Comment #10
ergonlogicNew features need to be implemented in Aegir 3.x, then we can consider back-porting to Aegir 2.x.
Comment #11
Yuri CreditAttribution: Yuri commentedCurrently this is a priority. IDN domains are all over the place on the internet.
Comment #12
Yuri CreditAttribution: Yuri commentedSee also https://www.drupal.org/project/idna_convert
Comment #13
omega8cc CreditAttribution: omega8cc commentedWe have implemented this in BOA. Patch will be submitted soon.
Comment #14
omega8cc CreditAttribution: omega8cc commentedPatch for hostmaster attached (separate patch for hosting in the hosting queue)
Comment #15
helmo CreditAttribution: helmo at Initfour websolutions commenteddepends on #2712227: IDN domain names on-the-fly conversion which needs work ...
Comment #16
Aciid CreditAttribution: Aciid commented