ZF-1921: Zend_Validate_Hostname does not accept umlauts for com-TLD
Description
Zend_Validate_Hostname does not accept german umlauts for .com-TLDs.
Reproduce code:
require_once('Zend/Validate/Hostname.php');
$validator = new Zend_Validate_Hostname(Zend_Validate_Hostname::ALLOW_DNS,true);
$host = utf8_encode('www.möhrke.com');
if ($validator->isValid($host))
{
echo "PASS!";
}
else
{
echo "FAIL!
";
foreach ($validator->getMessages() as $message)
{
echo "$message
";
}
}
Output:
FAIL! 'www.möhrke.com' appears to be a DNS hostname but cannot match against hostname schema for TLD 'com' 'www.möhrke.com' does not appear to be a valid local network name 'www.möhrke.com' appears to be a local network name but but local network names are not allowed
Oh, by the way, www.möhrke.com is a valid hostname and connected ;-)
Comments
Posted by Thomas Weidner (thomas) on 2007-09-08T12:04:51.000+0000
Assigned to Darby
Posted by Simon R Jones (studio24) on 2007-09-17T12:03:46.000+0000
I am afraid .com domains are not currently set up to accept international characters. The only TLDs currently set up are: * at * ch * li * de * fi * hu * no * se
I will look into the characters accepted for .com's and will see if I can implement this.
Darby, how do I get an unordered list
- onto the documentation page at:
http://framework.zend.com/manual/en/…The list of current IDN supported domains needs to be more obvious than is currently the case.
Posted by Darby Felton (darby) on 2007-09-17T12:19:08.000+0000
Hi Simon; try the {{}} DocBook tag. You can search in your framework working copy for other documentation files having this tag for examples.
Posted by Simon R Jones (studio24) on 2007-09-19T11:11:10.000+0000
So far I cannot find a list of characters accepted for an IDN .com domain so I won't be able to implement this for the next ZF release (v1.0.2)
I'll carry on looking, but if anyone has any suggestions please do post here :-)
Posted by Simon R Jones (studio24) on 2007-09-20T11:37:43.000+0000
Documentation updated in revision 6423, this issue will be left open since I need to look into .com IDN support
Posted by Thomas Weidner (thomas) on 2009-03-29T14:13:48.000+0000
New feature implemented with r14532