Bug #80398 [Opn]: FILTER_FLAG_EMAIL_UNICODE is not working correctly

From: Date: Sun, 22 Nov 2020 10:18:29 +0000
Subject: Bug #80398 [Opn]: FILTER_FLAG_EMAIL_UNICODE is not working correctly
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-230516@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=80398&edit=1 ID: 80398 User updated by: shantanoo at gmail dot com Reported by: shantanoo at gmail dot com Summary: FILTER_FLAG_EMAIL_UNICODE is not working correctly Status: Open Type: Bug Package: *Regular Expressions Operating System: OSX 11.0.1 PHP Version: 7.4.12 Block user comment: N Private report: N New Comment: According to TinoDidrikse@freenode: <quote> https://github.com/php/php-src/blob/07fa13088e1349f4b5a044faeee57f2b34f6b6e4/ext/filter/logical_filters.c#L646 adds \pL\pN to allow for Unicode, for they forgot \pM for combining marks. </quote> <quote> Lack of \pM would also hit European letters like å (which is the decomposed form of å). </quote> Previous Comments: ------------------------------------------------------------------------ [2020-11-22 09:14:54] shantanoo at gmail dot com Description: ------------ म@example.com and मी@example.com are valid emails. But FILTER_FLAG_EMAIL_UNICODE fails for later email. Test script: --------------- <?php $email = 'मी@example.com'; print filter_var($email, FILTER_VALIDATE_EMAIL, FILTER_FLAG_EMAIL_UNICODE); ?> Expected result: ---------------- Following should be printed. मी@example.com ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=80398&edit=1

« previous php.bugs (#230516) next »