1MIME::Decoder::NBit(3)User Contributed Perl DocumentationMIME::Decoder::NBit(3)
2
3
4
6 MIME::Decoder::NBit - encode/decode a "7bit" or "8bit" stream
7
9 A generic decoder object; see MIME::Decoder for usage.
10
12 This is a MIME::Decoder subclass for the "7bit" and "8bit" content
13 transfer encodings. These are not "encodings" per se: rather, they are
14 simply assertions of the content of the message. From RFC-2045 Section
15 6.2.:
16
17 Three transformations are currently defined: identity, the "quoted-
18 printable" encoding, and the "base64" encoding. The domains are
19 "binary", "8bit" and "7bit".
20
21 The Content-Transfer-Encoding values "7bit", "8bit", and "binary" all
22 mean that the identity (i.e. NO) encoding transformation has been
23 performed. As such, they serve simply as indicators of the domain of
24 the body data, and provide useful information about the sort of
25 encoding that might be needed for transmission in a given transport
26 system.
27
28 In keeping with this: as of MIME-tools 4.x, this class does no modifi‐
29 cation of its input when encoding; all it does is attempt to detect
30 violations of the 7bit/8bit assertion, and issue a warning (one per
31 message) if any are found.
32
33 Legal 7bit data
34
35 RFC-2045 Section 2.7 defines legal "7bit" data:
36
37 "7bit data" refers to data that is all represented as relatively
38 short lines with 998 octets or less between CRLF line separation
39 sequences [RFC-821]. No octets with decimal values greater than 127
40 are allowed and neither are NULs (octets with decimal value 0). CR
41 (decimal value 13) and LF (decimal value 10) octets only occur as
42 part of CRLF line separation sequences.
43
44 Legal 8bit data
45
46 RFC-2045 Section 2.8 defines legal "8bit" data:
47
48 "8bit data" refers to data that is all represented as relatively
49 short lines with 998 octets or less between CRLF line separation
50 sequences [RFC-821]), but octets with decimal values greater than 127
51 may be used. As with "7bit data" CR and LF octets only occur as part
52 of CRLF line separation sequences and no NULs are allowed.
53
54 How decoding is done
55
56 The decoder does a line-by-line pass-through from input to output,
57 leaving the data unchanged except that an end-of-line sequence of CRLF
58 is converted to a newline "\n". Given the line-oriented nature of 7bit
59 and 8bit, this seems relatively sensible.
60
61 How encoding is done
62
63 The encoder does a line-by-line pass-through from input to output, and
64 simply attempts to detect violations of the "7bit"/"8bit" domain. The
65 default action is to warn once per encoding if violations are detected;
66 the warnings may be silenced with the QUIET configuration of
67 MIME::Tools.
68
70 Eryq (eryq@zeegee.com), ZeeGee Software Inc (http://www.zeegee.com).
71
72 All rights reserved. This program is free software; you can redis‐
73 tribute it and/or modify it under the same terms as Perl itself.
74
76 $Revision: 1.10 $ $Date: 2006/03/17 21:03:23 $
77
78
79
80perl v5.8.8 2006-03-17 MIME::Decoder::NBit(3)