Edit report at https://bugs.php.net/bug.php?id=39469&edit=1
ID: 39469
Comment by: dean at deansas dot org
Reported by: christoph at ziegenberg dot de
Summary: FILTER_VALIDATE_EMAIL does not accept IDN domain
names
Status: Closed
Type: Feature/Change Request
Package: *General Issues
Operating System: WinXP SP2
PHP Version: 5.2.0
Assigned To: aharvey
Block user comment: N
Private report: N
New Comment:
This doesn't seem to be fixed. Please reopen.
dean@ernie:~$ php -r "var_dump(filter_var('fred@bücher.ch',
FILTER_VALIDATE_EMAIL));"
bool(false)
Using:
PHP 5.3.10-1ubuntu3.5 with Suhosin-Patch (cli) (built: Jan 18 2013 23:40:19)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies
Previous Comments:
------------------------------------------------------------------------
[2010-09-27 05:13:24] [email protected]
This has since been fixed, and works in the current 5.2 and 5.3 releases.
------------------------------------------------------------------------
[2006-11-11 11:19:54] christoph at ziegenberg dot de
Description:
------------
The filter FILTER_VALIDATE_EMAIL does not accept IDN domain names, so valid
email addresses are not accepted, the punycode version works.
I know the check for this is a little bit complex, because the allowed chars in
the domain name depend on the TLD.
I think the current behavior is okay as default, but there should be an option
to allow IDN domain names.
Reproduce code:
---------------
<?php
var_dump(filter_var('test@tätärätää.de', FILTER_VALIDATE_EMAIL));
var_dump(filter_var('[email protected]', FILTER_VALIDATE_EMAIL));
?>
Expected result:
----------------
string(...) "..."
string(...) "..."
Actual result:
--------------
bool(false)
string(...) "..."
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=39469&edit=1