18 |
|
|
19 |
This file documents the Emacs MIME interface functionality. |
This file documents the Emacs MIME interface functionality. |
20 |
|
|
21 |
Copyright (C) 1998,99,2000 Free Software Foundation, Inc. |
Copyright (C) 1998,99,2000, 2002 Free Software Foundation, Inc. |
22 |
|
|
23 |
Permission is granted to copy, distribute and/or modify this document |
Permission is granted to copy, distribute and/or modify this document |
24 |
under the terms of the GNU Free Documentation License, Version 1.1 or |
under the terms of the GNU Free Documentation License, Version 1.1 or |
47 |
@page |
@page |
48 |
|
|
49 |
@vskip 0pt plus 1filll |
@vskip 0pt plus 1filll |
50 |
Copyright @copyright{} 1998,99,2000 Free Software Foundation, Inc. |
Copyright @copyright{} 1998,99,2000, 2002 Free Software Foundation, Inc. |
51 |
|
|
52 |
Permission is granted to copy, distribute and/or modify this document |
Permission is granted to copy, distribute and/or modify this document |
53 |
under the terms of the GNU Free Documentation License, Version 1.1 or |
under the terms of the GNU Free Documentation License, Version 1.1 or |
1264 |
be chosen. |
be chosen. |
1265 |
|
|
1266 |
@vindex mail-parse-charset |
@vindex mail-parse-charset |
1267 |
If you are running a non-Mule Emacs, this process is simple: if the part |
@cindex unibyte Emacs |
1268 |
|
If you are running a non-Mule XEmacs, or Emacs in unibyte |
1269 |
|
mode@footnote{Deprecated!}, this process is simple: if the part |
1270 |
contains any non-@sc{ascii} (8-bit) characters, the @sc{mime} charset |
contains any non-@sc{ascii} (8-bit) characters, the @sc{mime} charset |
1271 |
given by @code{mail-parse-charset} (a symbol) is used. (Never set this |
given by @code{mail-parse-charset} (a symbol) is used. (Never set this |
1272 |
variable directly, though. If you want to change the default charset, |
variable directly, though. If you want to change the default charset, |
1276 |
@sc{ascii} characters, the @sc{mime} charset @samp{US-ASCII} is used, of |
@sc{ascii} characters, the @sc{mime} charset @samp{US-ASCII} is used, of |
1277 |
course. |
course. |
1278 |
|
|
1279 |
@cindex Mule |
@cindex multibyte Emacs |
1280 |
@cindex UTF-8 |
@cindex @code{mime-charset} property |
1281 |
@cindex Unicode |
In a normal (multibyte) Emacs session, a list of coding systems is |
1282 |
|
derived that can encode the message part's content and correspond to |
1283 |
|
MIME charsets (according to their @code{mime-charset} property). This |
1284 |
|
list is according to the normal priority rules and the highest priority |
1285 |
|
one is chosen to encode the part. If no such coding system can encode |
1286 |
|
the part's contents, they are split into several parts such that each |
1287 |
|
can be encoded with an appropriate coding system/@sc{mime} |
1288 |
|
charset.@footnote{The part can only be split at line boundaries, |
1289 |
|
though---if more than one @sc{mime} charset is required to encode a |
1290 |
|
single line, it is not possible to encode the part.} Note that this |
1291 |
|
procedure works with any correctly-defined coding systems, not just |
1292 |
|
built-in ones. Given a suitably-defined UTF-8 coding system---one |
1293 |
|
capable of encoding the Emacs charsets you use---it is not normally |
1294 |
|
necessary to split a part by charset. |
1295 |
|
|
1296 |
@vindex mm-mime-mule-charset-alist |
@vindex mm-mime-mule-charset-alist |
1297 |
Things are slightly more complicated when running Emacs with Mule |
@cindex XEmacs/Mule |
1298 |
support. In this case, a list of the Mule charsets used in the part is |
It isn't possible to do this properly in XEmacs/Mule. Instead, a list |
1299 |
obtained, and the corresponding @sc{mime} charsets are determined. If |
of the Mule charsets used in the part is obtained, and the |
1300 |
this results in a single @sc{mime} charset, this is used to encode the |
corresponding @sc{mime} charsets are determined by lookup in |
1301 |
part. But if the resulting list of @sc{mime} charsets contains more |
@code{mm-mime-mule-charset-alist}. If the list elements all |
1302 |
than one element, two things can happen: if it is possible to encode the |
correspond to a single @sc{mime} charset, that is used to encode the |
1303 |
part via UTF-8, this charset is used. (For this, Emacs must support the |
part. Otherwise, the part is split as above. |
|
@code{utf-8} coding system, and the part must consist entirely of |
|
|
characters which have Unicode counterparts.) If UTF-8 is not available, |
|
|
the part is split into several, so that each one can be encoded with a |
|
|
single @sc{mime} charset. The part can only be split at line |
|
|
boundaries, though---if more than one @sc{mime} charset is required to |
|
|
encode a single line, it is not possible to encode the part. |
|
1304 |
|
|
1305 |
@node Conversion |
@node Conversion |
1306 |
@section Conversion |
@section Conversion |