Hi All,

I would like to suggest the addition of IDN support to Domain Access. This should be a feasible task since much of the work is already done by the PHP extension Net/IDNA (http://pear.php.net/package/Net_IDNA).

I would like to suggest the addition of a code snippet to Domain (or Drupal core) similar to this:

require_once('Net/IDNA.php'); # You must install Net/IDNA

$is_idn_domain_name = 0; # Assume not IDN until proven otherwis
$this_decoded_domain_name = $this_domain_name; # Assume that the domain name returned by the web server is not IDN (not xn--<...>)

# IDNA:
$idna = Net_IDNA::getInstance();
if ($idna = Net_IDNA::getInstance()) {
if ($this_decoded_domain_name = $idna->decode($this_domain_name)) { # If the domain name returned by the server can be decoded (converted into IDN), then the decoded domain name (non-ASCII) is the result of decoding the domain name
$is_idn_domain_name = 1; # Set a flag: The domain name is an IDN
}
}

Any thoughts on this?

Thanks,
-DrupalFan

Comments

agentrickard’s picture

Version: 6.x-2.2 » 6.x-2.x-dev

This has come up before, and I have been against it, since IDNA is non-standard and requires special effort on the part of the host.

What I'd like to do is create a stand-alone module (Domain IDNA) and modify the core API to support it. If you search the issue queue, I'm fairly certain that the only issue that came up is problems with domain_valid_domain(), which would need to be modified. Perhaps a simple _alter() hook that lets other modules override the validation would be enough.

Since I don't work with IDNA, I don't know how I would test this, and I would certainly like to see a separate module release with its own dedicated maintainer.

Any takers?

eldrupal’s picture

Issue tags: +domain access idn idna internationalized domain names net_idna domain_idna

@agentrickard, thank you for the suggestion. I am going to look into this in the coming weeks. Integrating Net/IDNA into a standalone module, domain_idna, is the easy part. I'll probably need support to hook it up with Domain Access and make it available from DA and the other Domain modules.

Cheers,
~DrupalFan

agentrickard’s picture

I'm supporting too much code as it is. This will need a proper maintained release of its own.

agentrickard’s picture

Status: Active » Closed (won't fix)

This has to be done in a separate module. If it needs API changes to support it, file a D7 issue.

tr’s picture

Issue summary: View changes
Issue tags: -domain access idn idna internationalized domain names net_idna domain_idna +IDN, +idna

Tags are supposed to be separated with a comma - see the instructions right under the "Issue tags" textfield when you submit an issue.

Also please read the tag guidelines before you post. Again, this is written in the instructions.