Are email addresses allowed to contain non
I'm building a website using `Django. The website could have significant users from non-English speaking countries.
I just want to know if there are any technical restrictions on what types of characters an email address could contain.
Are email addresses only allowed to contain English alphabets, numbers, "_", "@" and "."?
Are they allowed to contain non-English alphabets like "é" or "ü"?
Are they allowed to contain Chinese or Japanese or other Unicode characters?
Email address consists of two parts local
before @ and domain
that goes after.
Rules to these parts are different:
For local part
you can use ASCII:
U+007F
, encoded as UTF-8. Domain part
is more restricted:
Regex to validate
^(([^<>()[].,;:s@"]+(.[^<>()[].,;:s@"]+)*)|(".+"))@(([^<>()[].,;:s@"]+.)+[^<>()[].,;:s@"]{2,})
Hope this saves you some time.
Well, yes. Read (at least) this article from Wikipedia.
I live in Argentina and here are allowed emails like ñoñó1234@server.com
The allowed syntax in an email address is described in RFC 3696, and is pretty involved.
The exact rule [for local part; the part before the '@'] is that any ASCII character, including control characters, may appear quoted, or in a quoted string. When quoting is needed, the backslash character is used to quote the following character
[...]
Without quotes, local-parts may consist of any combination of alphabetic characters, digits, or any of the special characters ! # $ % & ' * + - / = ? ^ _ ` . { | } ~
[...]
Any characters, or combination of bits (as octets), are permitted in DNS names. However, there is a preferred form that is required by most applications...
...and so on, in some depth.
链接地址: http://www.djcxy.com/p/92854.html上一篇: 邮件地址是否区分大小写?
下一篇: 电子邮件地址是否允许包含非