X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=mime-def.el;h=113c54889f891174563b46da70590c2a5c9c20fa;hb=a0635960288973b743ad8cbc6902efa866b5dbd7;hp=25002ef005fd2bc39c88dd0d9fd251995b6940f4;hpb=a154657eb30c43fc209b03315c7d83dfdf2a80ae;p=elisp%2Fflim.git diff --git a/mime-def.el b/mime-def.el index 25002ef..113c548 100644 --- a/mime-def.el +++ b/mime-def.el @@ -135,8 +135,14 @@ If method is nil, this field will not be encoded." (defconst mime-token-regexp (concat "[^" mime-tspecial-char-list "\000-\040]+")) (defconst mime-attribute-char-regexp - (concat "[^" mime-tspecial-char-list "\000-\040" + (concat "[^" mime-tspecial-char-list + "*'%" ; introduced in RFC 2231. + "\000-\040" + "]")) +(defconst mime-non-attribute-char-regexp + (concat "[" mime-tspecial-char-list "*'%" ; introduced in RFC 2231. + "\000-\040\177-\377" ; non-printable, non-US-ASCII. "]")) (defconst mime-charset-regexp @@ -144,7 +150,8 @@ If method is nil, this field will not be encoded." "*'%" ; should not include "%"? "]+")) -;; More precisely, length of "[A-Za-z]+" is limited to at most 8. +;; More precisely, length of each "[A-Za-z]+" is limited to at most 8. +;; See RFC 3066 "Tags for the Identification of Languages". ;; (defconst mime-language-regexp "[A-Za-z]+\\(-[A-Za-z]+\\)*") (defconst mime-language-regexp "[-A-Za-z]+")