티스토리 수익 글 보기

티스토리 수익 글 보기

MIME Parameter Value and Encoded Word Extensions: Character Sets, Languages, and Continuations Innosoft International, Inc.
1050 Lakes Drive West Covina CA 91790 USA +1 626 919 3600 +1 626 919 3614 ned.freed@innosoft.com
University of Tennessee
Computer Science Dept. 107 Ayres Hall Knoxville TN 37996-1301 USA moore@cs.utk.edu
Applications MIME character encoding media type multipurpose internet mail extensions
This memo defines extensions to the RFC 2045 media type and RFC 2183 disposition parameter value mechanisms to provide a means to specify parameter values in character sets other than US-ASCII, to specify the language to be used should the value be displayed, and a continuation mechanism for long parameter values to avoid problems with header line wrapping. This memo also defines an extension to the encoded words defined in RFC 2047 to allow the specification of the language to be used for display as well as the character set.
The Multipurpose Internet Mail Extensions, or MIME [RFC-2045, RFC-2046, RFC-2047, RFC-2048, RFC-2049], define a message format that allows for: textual message bodies in character sets other than US-ASCII, non-textual message bodies, multi-part message bodies, and textual header information in character sets other than US-ASCII. MIME is now widely deployed and is used by a variety of Internet protocols, including, of course, Internet email. However, MIME’s success has resulted in the need for additional mechanisms that were not provided in the original protocol specification. In particular, existing MIME mechanisms provide for named media type (content-type field) parameters as well as named disposition (content-disposition field). A MIME media type may specify any number of parameters associated with all of its subtypes, and any specific subtype may specify additional parameters for its own use. A MIME disposition value may specify any number of associated parameters, the most important of which is probably the attachment disposition’s filename parameter. These parameter names and values end up appearing in the content-type and content-disposition header fields in Internet email. This inherently imposes three crucial limitations: Lines in Internet email header fields are folded according to RFC 822 folding rules. This makes long parameter values problematic. MIME headers, like the RFC 822 headers they often appear in, are limited to 7bit US-ASCII, and the encoded-word mechanisms of RFC 2047 are not available to parameter values. This makes it impossible to have parameter values in character sets other than US-ASCII without specifying some sort of private per-parameter encoding. It has recently become clear that character set information is not sufficient to properly display some sorts of information — language information is also needed . For example, support for handicapped users may require reading text string aloud. The language the text is written in is needed for this to be done correctly. Some parameter values may need to be displayed, hence there is a need to allow for the inclusion of language information. The last problem on this list is also an issue for the encoded words defined by RFC 2047, as encoded words are intended primarily for display purposes. This document defines extensions that address all of these limitations. All of these extensions are implemented in a fashion that is completely compatible at a syntactic level with existing MIME implementations. In addition, the extensions are designed to have as little impact as possible on existing uses of MIME. IMPORTANT NOTE: These mechanisms end up being somewhat gibbous when they actually are used. As such, these mechanisms should not be used lightly; they should be reserved for situations where a real need for them exists.
This document occasionally uses terms that appear in capital letters. When the terms “MUST”, “SHOULD”, “MUST NOT”, “SHOULD NOT”, and “MAY” appear capitalized, they are being used to indicate particular requirements of this specification. A discussion of the meanings of these terms appears in .
Long MIME media type or disposition parameter values do not interact well with header line wrapping conventions. In particular, proper header line wrapping depends on there being places where linear whitespace (LWSP) is allowed, which may or may not be present in a parameter value, and even if present may not be recognizable as such since specific knowledge of parameter value syntax may not be available to the agent doing the line wrapping. The result is that long parameter values may end up getting truncated or otherwise damaged by incorrect line wrapping implementations. A mechanism is therefore needed to break up parameter values into smaller units that are amenable to line wrapping. Any such mechanism MUST be compatible with existing MIME processors. This means that the mechanism MUST NOT change the syntax of MIME media type and disposition lines, and the mechanism MUST NOT depend on parameter ordering since MIME states that parameters are not order sensitive. Note that while MIME does prohibit modification of MIME headers during transport, it is still possible that parameters will be reordered when user agent level processing is done. The obvious solution, then, is to use multiple parameters to contain a single parameter value and to use some kind of distinguished name to indicate when this is being done. And this obvious solution is exactly what is specified here: The asterisk character (“*”) followed by a decimal count is employed to indicate that multiple parameters are being used to encapsulate a single parameter value. The count starts at 0 and increments by 1 for each subsequent section of the parameter value. Decimal values are used and neither leading zeroes nor gaps in the sequence are allowed. The original parameter value is recovered by concatenating the various sections of the parameter, in order. For example, the content-type field
Content-Type: message/external-body; access-type=URL; URL*0=”ftp://”; URL*1=”cs.utk.edu/pub/moore/bulk-mailer/bulk-mailer.tar”
is semantically identical to
Content-Type: message/external-body; access-type=URL; URL=”ftp://cs.utk.edu/pub/moore/bulk-mailer/bulk-mailer.tar”
Note that quotes around parameter values are part of the value syntax; they are NOT part of the value itself. Furthermore, it is explicitly permitted to have a mixture of quoted and unquoted continuation fields.
Some parameter values may need to be qualified with character set or language information. It is clear that a distinguished parameter name is needed to identify when this information is present along with a specific syntax for the information in the value itself. In addition, a lightweight encoding mechanism is needed to accommodate 8 bit information in parameter values. Asterisks (“*”) are reused to provide the indicator that language and character set information is present and encoding is being used. A single quote (“‘”) is used to delimit the character set and language information at the beginning of the parameter value. Percent signs (“%”) are used as the encoding flag, which agrees with RFC 2047. Specifically, an asterisk at the end of a parameter name acts as an indicator that character set and language information may appear at the beginning of the parameter value. A single quote is used to separate the character set, language, and actual value information in the parameter value string, and an percent sign is used to flag octets encoded in hexadecimal. For example:
Content-Type: application/x-stuff; title*=us-ascii’en-us’This%20is%20%2A%2A%2Afun%2A%2A%2A
Note that it is perfectly permissible to leave either the character set or language field blank. Note also that the single quote delimiters MUST be present even when one of the field values is omitted. This is done when either character set, language, or both are not relevant to the parameter value at hand. This MUST NOT be done in order to indicate a default character set or language — parameter field definitions MUST NOT assign a default character set or language.
Character set and language information may be combined with the parameter continuation mechanism. For example:
Content-Type: application/x-stuff title*0*=us-ascii’en’This%20is%20even%20more%20 title*1*=%2A%2A%2Afun%2A%2A%2A%20 title*2=”isn’t it!”
Note that: Language and character set information only appear at the beginning of a given parameter value. Continuations do not provide a facility for using more than one character set or language in the same parameter value. A value presented using multiple continuations may contain a mixture of encoded and unencoded segments. The first segment of a continuation MUST be encoded if language and character set information are given. If the first segment of a continued parameter value is encoded the language and character set field delimiters MUST be present even when the fields are left blank.
RFC 2047 provides support for non-US-ASCII character sets in RFC 822 message header comments, phrases, and any unstructured text field. This is done by defining an encoded word construct which can appear in any of these places. Given that these are fields intended for display, it is sometimes necessary to associate language information with encoded words as well as just the character set. This specification extends the definition of an encoded word to allow the inclusion of such information. This is simply done by suffixing the character set specification with an asterisk followed by the language tag. For example:
From: =?US-ASCII*EN?Q?Keith_Moore?= <moore@cs.utk.edu>
IMAP4 servers SHOULD decode parameter value continuations when generating the BODY and BODYSTRUCTURE fetch attributes.
The ABNF for MIME parameter values given in RFC 2045 is: parameter := attribute “=” value attribute := token ; Matching of attributes ; is ALWAYS case-insensitive.
This specification changes this ABNF to: parameter := regular-parameter / extended-parameter regular-parameter := regular-parameter-name “=” value regular-parameter-name := attribute [section] attribute := 1*attribute-char attribute-char := <any (US-ASCII) CHAR except SPACE, CTLs, “*”, “‘”, “%”, or tspecials> section := initial-section / other-sections initial-section := “*0” other-sections := “*” (“1” / “2” / “3” / “4” / “5” / “6” / “7” / “8” / “9”) *DIGIT) extended-parameter := (extended-initial-name “=” extended-value) / (extended-other-names “=” extended-other-values) extended-initial-name := attribute [initial-section] “*” extended-other-names := attribute other-sections “*” extended-initial-value := [charset] “‘” [language] “‘” extended-other-values extended-other-values := *(ext-octet / attribute-char) ext-octet := “%” 2(DIGIT / “A” / “B” / “C” / “D” / “E” / “F”) charset := <registered character set name> language := <registered language tag >
The ABNF given in RFC 2047 for encoded-words is: encoded-word := “=?” charset “?” encoding “?” encoded-text “?=”
This specification changes this ABNF to: encoded-word := “=?” charset [“*” language] “?” encoded-text “?=”
In the future it is likely that some character sets will provide facilities for inline language labeling. Such facilities are inherently more flexible than those defined here as they allow for language switching in the middle of a string. If and when such facilities are developed they SHOULD be used in preference to the language labeling facilities specified here. Note that all the mechanisms defined here allow for the omission of language labels so as to be able to accommodate this possible future usage.
This RFC does not discuss security issues and is not believed to raise any security issues not already endemic in electronic mail and present in fully conforming implementations of MIME.
Standard for the format of ARPA Internet text messages University of Delaware, Dept. of Electrical Engineering
DCrocker@UDel-Relay
Tags for the Identification of Languages UNINETT
Harald.T.Alvestrand@uninett.no
Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies Innosoft International, Inc.
1050 East Garvey Avenue South West Covina CA 91790 US +1 818 919 3600 +1 818 919 3614 ned@innosoft.com
First Virtual Holdings
25 Washington Avenue Morristown NJ 07960 US +1 201 540 8967 +1 201 993 3032 nsb@nsb.fv.com
Multipurpose Internet Mail Extensions (MIME) Part Two: Media Types Innosoft International, Inc.
1050 East Garvey Avenue South West Covina CA 91790 US +1 818 919 3600 +1 818 919 3614 ned@innosoft.com
First Virtual Holdings
25 Washington Avenue Morristown NJ 07960 US +1 201 540 8967 +1 201 993 3032 nsb@nsb.fv.com
MIME (Multipurpose Internet Mail Extensions) Part Three: Message Header Extensions for Non-ASCII Text University of Tennessee
107 Ayres Hall Knoxville TN 37996-1301 moore@cs.utk.edu
Applications Amercian Standard Code for Information Interchange mail multipurpose internet mail extensions
Multipurpose Internet Mail Extensions (MIME) Part Four: Registration Procedures Innosoft International, Inc.
1050 East Garvey Avenue South West Covina CA 91790 USA +1 818 919 3600 +1 818 919 3614 ned@innosoft.com
MCI
2100 Reston Parkway Reston VA 22091 +1 703 715-7361 +1 703 715-7436 klensin@mci.net
USC/Information Sciences Institute
4676 Admiralty Way Marina del Rey CA 90292 USA +1 310 822 1511 +1 310 823 6714 Postel@ISI.EDU
Applications mail media type multipurpose internet mail extensions
Multipurpose Internet Mail Extensions (MIME) Part Five: Conformance Criteria and Examples Innosoft International, Inc.
1050 East Garvey Avenue South West Covina CA 91790 USA +1 818 919 3600 +1 818 919 3614 ned@innosoft.com
First Virtual Holdings
25 Washington Avenue Morristown NJ 07960 USA +1 201 540 8967 +1 201 993 3032 nsb@nsb.fv.com
Applications mail multipurpose internet mail extensions
Internet Message Access Protocol – Version 4rev1 University of Washington, Networks and Distributed Computing
4545 15th Aveneue NE Seattle WA 98105-4527 US +1 206 543 5762 MRC@CAC.Washington.EDU
Key words for use in RFCs to Indicate Requirement Levels Harvard University
sob@harvard.edu
General keyword
The Report of the IAB Character Set Workshop held 29 February – 1 March, 1996 Microsoft Corp.
1 Microsoft Way Redmond WA 98052 USA cweider@microsoft.com
Preston & Lynch
PO Box 8310 Emeryville CA 94662 USA cecilia@well.com
DKUUG
Freubjergvey 3 DK-2100 Kxbenhavn X Danmark Keld@dkuug.dk
UNINETT
P.O.Box 6883 Elgeseter N-7002 TRONDHEIM NORWAY Harald.T.Alvestrand@uninett.no
cisco Systems
170 West Tasman Drive San Jose CA 95134-1706 USA rja@cisco.com
Networks & Distributed Computing
University of Washington 4545 15th Avenue Seattle WA 98105-4527 USA mrc@cac.washington.edu
Dept. of Numberical Analysis and Computing Science (Nada)
Royal Institute of Technology SE-100 44 STOCKHOLM SWEDEN psv@nada.kth.se
Applications
Communicating Presentation Information in Internet Messages: The Content-Disposition Header Field New Century Systems
324 East 41st Street #804 New York NY 10017 USA +1 (212) 557-2050 +1 (212) 557-2049 rens@century.com
QUALCOMM Incorporated
6455 Lusk Boulevard San Diego CA 92121 USA sdorner@qualcomm.com
Department of Computer Science
University of Tennessee Knoxville 107 Ayres Hall Knoxville TN 37996-1301 USA +1 (423) 974-5067 +1 (423) 974-8296 moore@cs.utk.edu
Applications MIME internet message multipurpose internet mail extensions