.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "MIME::Decoder::NBit 3pm" .TH MIME::Decoder::NBit 3pm 2024-02-09 "perl v5.38.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME MIME::Decoder::NBit \- encode/decode a "7bit" or "8bit" stream .SH SYNOPSIS .IX Header "SYNOPSIS" A generic decoder object; see MIME::Decoder for usage. .SH DESCRIPTION .IX Header "DESCRIPTION" This is a MIME::Decoder subclass for the \f(CW\*(C`7bit\*(C'\fR and \f(CW\*(C`8bit\*(C'\fR content transfer encodings. These are not "encodings" per se: rather, they are simply assertions of the content of the message. From RFC\-2045 Section 6.2.: .PP .Vb 3 \& Three transformations are currently defined: identity, the "quoted\- \& printable" encoding, and the "base64" encoding. The domains are \& "binary", "8bit" and "7bit". \& \& The Content\-Transfer\-Encoding values "7bit", "8bit", and "binary" all \& mean that the identity (i.e. NO) encoding transformation has been \& performed. As such, they serve simply as indicators of the domain of \& the body data, and provide useful information about the sort of \& encoding that might be needed for transmission in a given transport \& system. .Ve .PP In keeping with this: as of MIME-tools 4.x, \&\fIthis class does no modification of its input when encoding;\fR all it does is attempt to \fIdetect violations\fR of the 7bit/8bit assertion, and issue a warning (one per message) if any are found. .SS "Legal 7bit data" .IX Subsection "Legal 7bit data" RFC\-2045 Section 2.7 defines legal \f(CW\*(C`7bit\*(C'\fR data: .PP .Vb 6 \& "7bit data" refers to data that is all represented as relatively \& short lines with 998 octets or less between CRLF line separation \& sequences [RFC\-821]. No octets with decimal values greater than 127 \& are allowed and neither are NULs (octets with decimal value 0). CR \& (decimal value 13) and LF (decimal value 10) octets only occur as \& part of CRLF line separation sequences. .Ve .SS "Legal 8bit data" .IX Subsection "Legal 8bit data" RFC\-2045 Section 2.8 defines legal \f(CW\*(C`8bit\*(C'\fR data: .PP .Vb 5 \& "8bit data" refers to data that is all represented as relatively \& short lines with 998 octets or less between CRLF line separation \& sequences [RFC\-821]), but octets with decimal values greater than 127 \& may be used. As with "7bit data" CR and LF octets only occur as part \& of CRLF line separation sequences and no NULs are allowed. .Ve .SS "How decoding is done" .IX Subsection "How decoding is done" The \fBdecoder\fR does a line-by-line pass-through from input to output, leaving the data unchanged \fIexcept\fR that an end-of-line sequence of CRLF is converted to a newline "\en". Given the line-oriented nature of 7bit and 8bit, this seems relatively sensible. .SS "How encoding is done" .IX Subsection "How encoding is done" The \fBencoder\fR does a line-by-line pass-through from input to output, and simply attempts to \fIdetect\fR violations of the \f(CW\*(C`7bit\*(C'\fR/\f(CW\*(C`8bit\*(C'\fR domain. The default action is to warn once per encoding if violations are detected; the warnings may be silenced with the QUIET configuration of MIME::Tools. .SH "SEE ALSO" .IX Header "SEE ALSO" MIME::Decoder .SH AUTHOR .IX Header "AUTHOR" Eryq (\fIeryq@zeegee.com\fR), ZeeGee Software Inc (\fIhttp://www.zeegee.com\fR). .PP All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.