Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I upper case an email address?

I expect this should be a pretty easy question. It is in two parts:

  1. Are email addresses case sensitive? (i.e. is [email protected] different from [email protected]?)
  2. If so, what is the correct locale to use for capitalising an email address? (i.e. capitalising the email [email protected] would be different in the US and Turkish locales)
like image 503
johnstok Avatar asked Feb 17 '09 09:02

johnstok


1 Answers

Judging from the specs the first part can be case sensitive, but normally it's not.
Since it's all ASCII you should be safe using a "naive" uppercase function.

Check out the RFC spec part of the wikipedia article on E-mail adresses

If you're in for some heavier reading RFC5322 and RFC5321 should be useful too.

like image 100
grapefrukt Avatar answered Jan 04 '23 11:01

grapefrukt