Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:82876 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 9115 invoked from network); 16 Feb 2015 18:59:53 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Feb 2015 18:59:53 -0000 Authentication-Results: pb1.pair.com header.from=zardozrocks@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=zardozrocks@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.213.170 as permitted sender) X-PHP-List-Original-Sender: zardozrocks@gmail.com X-Host-Fingerprint: 209.85.213.170 mail-ig0-f170.google.com Received: from [209.85.213.170] ([209.85.213.170:37011] helo=mail-ig0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 4B/4B-36518-52E32E45 for ; Mon, 16 Feb 2015 13:59:49 -0500 Received: by mail-ig0-f170.google.com with SMTP id l13so33886311iga.1 for ; Mon, 16 Feb 2015 10:59:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=FCMjodaOM8F0hvvhuC6VBP6a8PWYAsiKBLRBAqesxcg=; b=wQW3U6Bp5ZJqBS0+sMaeHBkzuRRegj8WxTRro2EkC/4PgAzUWV0QKW/RRWHwOt4Gj4 sdtiuYYBy46LwTuqtQBaG3aNZ+2MchT9G1FSgezFmwPqFpe8p8NAPeDVLstSLpGujNCp Xj95om+QU4N2BF7wjFtRp26JY3hzOz1iogcAMFkHC2q3PerGrsTVoNPm2dt83TADjNqW 9S+hfp1clxh0u8yiL1AaLXjPoxjYMcBts55l08I3St0PgF5/Wv4DbV0qpsGglARjfENt Gy16cxIkKTam2f6CoJnnKMeoxJciqJ4ihMYEdsGkZG9pfDjyj3Q1qwPVHDNacqWrpm4y e8og== MIME-Version: 1.0 X-Received: by 10.43.79.129 with SMTP id zq1mr11612365icb.28.1424113186614; Mon, 16 Feb 2015 10:59:46 -0800 (PST) Received: by 10.107.137.196 with HTTP; Mon, 16 Feb 2015 10:59:46 -0800 (PST) In-Reply-To: <54D4DA6E.1060606@gmail.com> References: <54D4DA6E.1060606@gmail.com> Date: Mon, 16 Feb 2015 10:59:46 -0800 Message-ID: To: Rowan Collins , internals Content-Type: multipart/alternative; boundary=001a113320189bb1f9050f3930d6 Subject: Re: [PHP-DEV] filter_var doesn't support international email addresses From: zardozrocks@gmail.com (j adams) --001a113320189bb1f9050f3930d6 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Rowan, thanks for your response. Wow that regex is pretty intense. A new filter type sounds like a reasonable idea to me. I'm not sure if I'll be able to offer any improvements myself (although I will look into it shortly here). I I do know that Google announced last August that they plan to support RFC6530: http://googleblog.blogspot.com/2014/08/a-first-step-toward-more-global-emai= l.html On Fri, Feb 6, 2015 at 7:14 AM, Rowan Collins wrote: > j adams wrote on 06/02/2015 00:05: > > Please let me know which mailing list address to use if I have sent this >> to >> the wrong list. >> >> filter_var does not properly validate emails with international >> characters. >> For example, this returns FALSE: >> >> var_dump(filter_var("Pel=C3=A9@example.com", FILTER_VALIDATE_EMAIL)); >> >> Are there any plans to implement proper validation of email addresses as >> described in RFC 6530? >> http://tools.ietf.org/html/rfc6530 >> > > Hi, > > There was a discussion a while back about Internationalized Domain Name > support in FILTER_VALIDATE_URL [1], and I believe there was a concern tha= t > since not all systems would accept the wider format, allowing them throug= h > the existing filter might be unhelpful. This is particularly true in the > case of internationalized e-mails, since if I understand it correctly it'= s > an "all or nothing" system, rather than one with a compatible fallback li= ke > the "punycode" notation used in domains. > > The most useful would probably be to add a new filter type which accepted > the new format, so that users could choose to accept what they know they > can process. If you know of or can create a succinct validity test (e.g. = a > PCRE-compatible regex) it ought to be fairly easy to add; the existing > implementation is here for comparison: http://lxr.php.net/xref/PHP_ > TRUNK/ext/filter/logical_filters.c#575 > > [1] http://grokbase.com/t/php/php-internals/149jfzxtq3/ > internationalized-domain-name-support-in-filter-validate-url > > Regards, > -- > Rowan Collins > [IMSoP] > --001a113320189bb1f9050f3930d6--