Re:Stop Validating Email Addresses with Regex (2012)
by electroly on Wednesday April 20, 2022 @09:45AM
(#31096863)
The local-part before the @ can be case-sensitive, yes. I've never heard of a mail server that treats it as such, but the RFC says it's case sensitive.
Re:Stop Validating Email Addresses with Regex (2012)
by hathawsh on Wednesday April 20, 2022 @02:53PM
(#31101306)
To be clear, by "upper" unicode characters I mean non-ASCII international characters, not uppercase characters. For example, 我買@屋企.香港 is now a valid email address. [1]
1. https://en.wikipedia.org/wiki/Email_address#Internationaliza...
Re:Stop Validating Email Addresses with Regex (2012)
by jeroenhd on Wednesday April 20, 2022 @02:03PM
(#31100712)
Not all uppercase characters have just one lowercase representation, and not all lowercase characters have an uppercase character. If you try to make the addresses case insensitive, you're bound to run into unnecessary complexities at some point.
Email addresses aren't case insensitive in nature, but many commercial mail services (and misguided developers) assume they are.
Are e-mail addresses case-sensitive? I would always lowercase&trim a string meant to represent an e-mail address (or a domain name) before doing anything else with it.