| 1 |
<pre>Network Working Group D. Goldsmith |
| 2 |
Request for Comments: 1641 M. Davis |
| 3 |
Category: Experimental Taligent, Inc. |
| 4 |
July 1994 |
| 5 |
|
| 6 |
|
| 7 |
<span class="h1">Using Unicode with MIME</span> |
| 8 |
|
| 9 |
Status of this Memo |
| 10 |
|
| 11 |
This memo defines an Experimental Protocol for the Internet |
| 12 |
community. This memo does not specify an Internet standard of any |
| 13 |
kind. Distribution of this memo is unlimited. |
| 14 |
|
| 15 |
Abstract |
| 16 |
|
| 17 |
The Unicode Standard, version 1.1, and ISO/IEC 10646-1:1993(E) |
| 18 |
jointly define a 16 bit character set (hereafter referred to as |
| 19 |
Unicode) which encompasses most of the world's writing systems. |
| 20 |
However, Internet mail (STD 11, <a href="./rfc822">RFC 822</a>) currently supports only 7- |
| 21 |
bit US ASCII as a character set. MIME (<a href="./rfc1521">RFC 1521</a> and <a href="./rfc1522">RFC 1522</a>) extends |
| 22 |
Internet mail to support different media types and character sets, |
| 23 |
and thus could support Unicode in mail messages. MIME neither defines |
| 24 |
Unicode as a permitted character set nor specifies how it would be |
| 25 |
encoded, although it does provide for the registration of additional |
| 26 |
character sets over time. |
| 27 |
|
| 28 |
This document specifies the usage of Unicode within MIME. |
| 29 |
|
| 30 |
Motivation |
| 31 |
|
| 32 |
Since Unicode is starting to see widespread commercial adoption, |
| 33 |
users will want a way to transmit information in this character set |
| 34 |
in mail messages and other Internet media. Since MIME was expressly |
| 35 |
designed to allow such extensions and is on the standards track for |
| 36 |
the Internet, it is the most appropriate means for encoding Unicode. |
| 37 |
<a href="./rfc1521">RFC 1521</a> and <a href="./rfc1522">RFC 1522</a> do not define Unicode as an allowed character |
| 38 |
set, but allow registration of additional character sets. |
| 39 |
|
| 40 |
In addition to allowing use of Unicode within MIME bodies, another |
| 41 |
goal is to specify a way of using Unicode that allows text which |
| 42 |
consists largely, but not entirely, of US-ASCII characters to be |
| 43 |
represented in a way that can be read by mail clients who do not |
| 44 |
understand Unicode. This is in keeping with the philosophy of MIME. |
| 45 |
Such an encoding is described in another document, "UTF-7: A Mail |
| 46 |
Safe Transformation Format of Unicode" [<a href="#ref-UTF-7" title=""UTF-7: A Mail Safe Transformation Format of Unicode"">UTF-7</a>]. |
| 47 |
|
| 48 |
|
| 49 |
|
| 50 |
|
| 51 |
|
| 52 |
<span class="grey">Goldsmith & Davis [Page 1]</span></pre> |
| 53 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-2" ></span> |
| 54 |
<span class="grey"><a href="./rfc1641">RFC 1641</a> Using Unicode with MIME July 1994</span> |
| 55 |
|
| 56 |
|
| 57 |
Overview |
| 58 |
|
| 59 |
Several ways of using Unicode are possible. This document specifies |
| 60 |
both guidelines for use of Unicode within MIME, and a specific usage. |
| 61 |
The usage specified in this document is a straightforward use of |
| 62 |
Unicode as specified in "The Unicode Standard, Version 1.1". |
| 63 |
|
| 64 |
This encoding is intended for situations where sender and recipient |
| 65 |
do not want to do a lot of processing, when the text does not consist |
| 66 |
primarily of characters from the US-ASCII character set, or when |
| 67 |
sender and receiver are known in advance to support Unicode. |
| 68 |
|
| 69 |
Another encoding is intended for situations where the text consists |
| 70 |
primarily of US-ASCII, with occasional characters from other parts of |
| 71 |
Unicode. This encoding allows the US-ASCII portion to be read by all |
| 72 |
recipients without having to support Unicode. This encoding is |
| 73 |
specified in another document, "UTF-7: A Mail Safe Transformation |
| 74 |
Format of Unicode" [<a href="#ref-UTF-7" title=""UTF-7: A Mail Safe Transformation Format of Unicode"">UTF-7</a>]. |
| 75 |
|
| 76 |
Finally, in keeping with the principles set forth in <a href="./rfc1521">RFC 1521</a>, text |
| 77 |
which can be represented using the US-ASCII or ISO-8859-x character |
| 78 |
sets should be so represented where possible, for maximum |
| 79 |
interoperability. |
| 80 |
|
| 81 |
Definitions |
| 82 |
|
| 83 |
The definition of character set Unicode: |
| 84 |
|
| 85 |
The 16 bit character set Unicode is defined by "The Unicode |
| 86 |
Standard, Version 1.1". This character set is identical with the |
| 87 |
character repertoire and coding of the international standard |
| 88 |
ISO/IEC 10646-1:1993(E); Coded Representation Form=UCS-2; |
| 89 |
Subset=300; Implementation Level=3. |
| 90 |
|
| 91 |
Note. Unicode 1.1 further specifies the use and interaction of |
| 92 |
these character codes beyond the ISO standard. However, any valid |
| 93 |
10646 BMP (Basic Multilingual Plane) sequence is a valid Unicode |
| 94 |
sequence, and vice versa; Unicode supplies interpretations of |
| 95 |
sequences on which the ISO standard is silent as to |
| 96 |
interpretation. |
| 97 |
|
| 98 |
This character set is encoded as sequences of octets, two per 16- |
| 99 |
bit character, with the most significant octet first. Text with an |
| 100 |
odd number of octets is ill-formed. |
| 101 |
|
| 102 |
Rationale. ISO/IEC 10646-1:1993(E) specifies that when characters |
| 103 |
in the UCS-2 form are serialized as octets, that the most |
| 104 |
significant octet appear first. This is also in keeping with |
| 105 |
|
| 106 |
|
| 107 |
|
| 108 |
<span class="grey">Goldsmith & Davis [Page 2]</span></pre> |
| 109 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-3" ></span> |
| 110 |
<span class="grey"><a href="./rfc1641">RFC 1641</a> Using Unicode with MIME July 1994</span> |
| 111 |
|
| 112 |
|
| 113 |
common network practice of choosing a canonical format for |
| 114 |
transmission. |
| 115 |
|
| 116 |
General Specification of Unicode Character Sets Within MIME |
| 117 |
|
| 118 |
The Unicode Standard is currently at version 1.1. Although new |
| 119 |
versions should be compatible with old implementations if an |
| 120 |
implementation is compliant with the standard, some implementations |
| 121 |
may choose to check the version of the character set that is being |
| 122 |
used. In order to allow some implementations to check the version |
| 123 |
number and allow others to ignore it, all registrations of Unicode |
| 124 |
variants and versions for MIME usage should have MIME charset names |
| 125 |
which conform to one of the two following patterns: |
| 126 |
|
| 127 |
UNICODE-major-minor |
| 128 |
UNICODE-major-minor-variant |
| 129 |
|
| 130 |
Where major and minor are strings of decimal digits (0 through 9) |
| 131 |
specifying the major and minor version number of the Unicode standard |
| 132 |
to which the text in question conforms. In the interests of |
| 133 |
interoperability, the lowest version number compatible with the text |
| 134 |
should be used. The lowest acceptable version number is UNICODE-1-1, |
| 135 |
corresponding to "The Unicode Standard, Version 1.1". The optional |
| 136 |
trailing string "variant" describes the particular transformation |
| 137 |
format of Unicode that the registration describes; its content is up |
| 138 |
to the particular registration. If there is no trailing variant |
| 139 |
string, the charset name refers to the basic two octet form of |
| 140 |
Unicode as described in "The Unicode Standard". |
| 141 |
|
| 142 |
Example. A hypothetical charset which referred to the UTF-8 |
| 143 |
transformation format of Unicode/10646 (also known as UTF-2 or UTF- |
| 144 |
FSS) might be named UNICODE-1-1-UTF-8. |
| 145 |
|
| 146 |
Encoding Character Set Unicode Within MIME |
| 147 |
|
| 148 |
Character set Unicode uses 16 bit characters, and therefore would |
| 149 |
normally be used with the Binary or Base64 content transfer encodings |
| 150 |
of MIME. In header fields, it would normally be used with the B |
| 151 |
content transfer encoding. The MIME character set identifier is |
| 152 |
UNICODE-1-1. |
| 153 |
|
| 154 |
Example. Here is a text portion of a MIME message containing the |
| 155 |
Japanese word "nihongo" (hexadecimal 65E5,672C,8A9E) written in Han |
| 156 |
characters. |
| 157 |
|
| 158 |
Content-Type: text/plain; charset=UNICODE-1-1 |
| 159 |
Content-Transfer-Encoding: base64 |
| 160 |
|
| 161 |
|
| 162 |
|
| 163 |
|
| 164 |
<span class="grey">Goldsmith & Davis [Page 3]</span></pre> |
| 165 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-4" ></span> |
| 166 |
<span class="grey"><a href="./rfc1641">RFC 1641</a> Using Unicode with MIME July 1994</span> |
| 167 |
|
| 168 |
|
| 169 |
ZeVnLIqe |
| 170 |
|
| 171 |
Example. Here is a text portion of a MIME message containing the |
| 172 |
Unicode sequence "A<NOT IDENTICAL TO><ALPHA>." (hexadecimal |
| 173 |
0041,2262,0391,002E) |
| 174 |
|
| 175 |
Content-Type: text/plain; charset=UNICODE-1-1 |
| 176 |
Content-Transfer-Encoding: base64 |
| 177 |
|
| 178 |
AEEiYgORAC4= |
| 179 |
|
| 180 |
Acknowledgements |
| 181 |
|
| 182 |
Many thanks to the following people for their contributions, |
| 183 |
comments, and suggestions. If we have omitted anyone it was through |
| 184 |
oversight and not intentionally. |
| 185 |
|
| 186 |
Glenn Adams |
| 187 |
Harald T. Alvestrand |
| 188 |
Nathaniel Borenstein |
| 189 |
Lee Collins |
| 190 |
Jim Conklin |
| 191 |
Dave Crocker |
| 192 |
Steve Dorner |
| 193 |
Dana S. Emery |
| 194 |
Ned Freed |
| 195 |
John H. Jenkins |
| 196 |
John C. Klensin |
| 197 |
Valdis Kletnieks |
| 198 |
Keith Moore |
| 199 |
Masataka Ohta |
| 200 |
Einar Stefferud |
| 201 |
|
| 202 |
Security Considerations |
| 203 |
|
| 204 |
Security issues are not discussed in this memo. |
| 205 |
|
| 206 |
References |
| 207 |
|
| 208 |
[UNICODE 1.1] "The Unicode Standard, Version 1.1": Version 1.0, Volume 1 |
| 209 |
(ISBN 0-201-56788-1), Version 1.0, Volume 2 (ISBN 0-201- |
| 210 |
60845-6), and "Unicode Technical Report #4, The Unicode |
| 211 |
Standard, Version 1.1" (available from The Unicode |
| 212 |
Consortium, and soon to be published by Addison-Wesley). |
| 213 |
|
| 214 |
[ISO 10646] ISO/IEC 10646-1:1993(E) Information Technology--Universal |
| 215 |
Multiple-octet Coded Character Set (UCS). |
| 216 |
|
| 217 |
|
| 218 |
|
| 219 |
|
| 220 |
<span class="grey">Goldsmith & Davis [Page 4]</span></pre> |
| 221 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-5" ></span> |
| 222 |
<span class="grey"><a href="./rfc1641">RFC 1641</a> Using Unicode with MIME July 1994</span> |
| 223 |
|
| 224 |
|
| 225 |
[<a id="ref-UTF-7">UTF-7</a>] Goldsmith, D., and M. Davis, "UTF-7: A Mail Safe |
| 226 |
Transformation Format of Unicode", <a href="./rfc1642">RFC 1642</a>, Taligent, |
| 227 |
Inc., July 1994. |
| 228 |
|
| 229 |
[<a id="ref-US-ASCII">US-ASCII</a>] Coded Character Set--7-bit American Standard Code for |
| 230 |
Information Interchange, ANSI X3.4-1986. |
| 231 |
|
| 232 |
[<a id="ref-ISO-8859">ISO-8859</a>] Information Processing -- 8-bit Single-Byte Coded Graphic |
| 233 |
Character Sets -- Part 1: Latin Alphabet No. 1, ISO 8859- |
| 234 |
1:1987. Part 2: Latin alphabet No. 2, ISO 8859-2, 1987. |
| 235 |
Part 3: Latin alphabet No. 3, ISO 8859-3, 1988. Part 4: |
| 236 |
Latin alphabet No. 4, ISO 8859-4, 1988. Part 5: |
| 237 |
Latin/Cyrillic alphabet, ISO 8859-5, 1988. Part 6: |
| 238 |
Latin/Arabic alphabet, ISO 8859-6, 1987. Part 7: |
| 239 |
Latin/Greek alphabet, ISO 8859-7, 1987. Part 8: |
| 240 |
Latin/Hebrew alphabet, ISO 8859-8, 1988. Part 9: Latin |
| 241 |
alphabet No. 5, ISO 8859-9, 1990. |
| 242 |
|
| 243 |
[<a id="ref-RFC822">RFC822</a>] Crocker, D., "Standard for the Format of ARPA Internet |
| 244 |
Text Messages", STD 11, <a href="./rfc822">RFC 822</a>, UDEL, August 1982. |
| 245 |
|
| 246 |
[<a id="ref-RFC-1521">RFC-1521</a>] Borenstein N., and N. Freed, "MIME (Multipurpose Internet |
| 247 |
Mail Extensions) Part One: Mechanisms for Specifying and |
| 248 |
Describing the Format of Internet Message Bodies", <a href="./rfc1521">RFC</a> |
| 249 |
<a href="./rfc1521">1521</a>, Bellcore, Innosoft, September 1993. |
| 250 |
|
| 251 |
[<a id="ref-RFC-1522">RFC-1522</a>] Moore, K., "Representation of Non-Ascii Text in Internet |
| 252 |
Message Headers" <a href="./rfc1522">RFC 1522</a>, University of Tennessee, |
| 253 |
September 1993. |
| 254 |
|
| 255 |
[<a id="ref-UTF-8">UTF-8</a>] X/Open Company Ltd., "File System Safe UCS Transformation |
| 256 |
Format (FSS_UTF)", X/Open Preliminary Specification, |
| 257 |
Document Number: P316. This information also appears in |
| 258 |
Unicode Technical Report #4, and in a forthcoming annex to |
| 259 |
ISO/IEC 10646. |
| 260 |
|
| 261 |
|
| 262 |
|
| 263 |
|
| 264 |
|
| 265 |
|
| 266 |
|
| 267 |
|
| 268 |
|
| 269 |
|
| 270 |
|
| 271 |
|
| 272 |
|
| 273 |
|
| 274 |
|
| 275 |
|
| 276 |
<span class="grey">Goldsmith & Davis [Page 5]</span></pre> |
| 277 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-6" ></span> |
| 278 |
<span class="grey"><a href="./rfc1641">RFC 1641</a> Using Unicode with MIME July 1994</span> |
| 279 |
|
| 280 |
|
| 281 |
Authors' Addresses |
| 282 |
|
| 283 |
David Goldsmith |
| 284 |
Taligent, Inc. |
| 285 |
10201 N. DeAnza Blvd. |
| 286 |
Cupertino, CA 95014-2233 |
| 287 |
|
| 288 |
Phone: 408-777-5225 |
| 289 |
Fax: 408-777-5081 |
| 290 |
EMail: [email protected] |
| 291 |
|
| 292 |
|
| 293 |
Mark Davis |
| 294 |
Taligent, Inc. |
| 295 |
10201 N. DeAnza Blvd. |
| 296 |
Cupertino, CA 95014-2233 |
| 297 |
|
| 298 |
Phone: 408-777-5116 |
| 299 |
Fax: 408-777-5081 |
| 300 |
EMail: [email protected] |
| 301 |
|
| 302 |
|
| 303 |
|
| 304 |
|
| 305 |
|
| 306 |
|
| 307 |
|
| 308 |
|
| 309 |
|
| 310 |
|
| 311 |
|
| 312 |
|
| 313 |
|
| 314 |
|
| 315 |
|
| 316 |
|
| 317 |
|
| 318 |
|
| 319 |
|
| 320 |
|
| 321 |
|
| 322 |
|
| 323 |
|
| 324 |
|
| 325 |
|
| 326 |
|
| 327 |
|
| 328 |
|
| 329 |
|
| 330 |
|
| 331 |
|
| 332 |
Goldsmith & Davis [Page 6] |
| 333 |
</pre> |