HEX
Server: Apache
System: Linux s198.coreserver.jp 5.15.0-151-generic #161-Ubuntu SMP Tue Jul 22 14:25:40 UTC 2025 x86_64
User: nagasaki (10062)
PHP: 7.1.33
Disabled: NONE
Upload Files
File: //usr/local/share/man/man3/MIME::Decoder::NBit.3pm
.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35)
.\"
.\" 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
..
.\" Set up some character translations and predefined strings.  \*(-- will
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
.\" double quote, and \*(R" will give a right double quote.  \*(C+ will
.\" give a nicer C++.  Capital omega is used to do unbreakable dashes and
.\" therefore won't be available.  \*(C` and \*(C' expand to `' in nroff,
.\" nothing in troff, for use with C<>.
.tr \(*W-
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
.ie n \{\
.    ds -- \(*W-
.    ds PI pi
.    if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
.    if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\"  diablo 12 pitch
.    ds L" ""
.    ds R" ""
.    ds C` ""
.    ds C' ""
'br\}
.el\{\
.    ds -- \|\(em\|
.    ds PI \(*p
.    ds L" ``
.    ds R" ''
.    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 3"
.TH MIME::Decoder::NBit 3 "2017-04-05" "perl v5.26.3" "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 \*(L"encodings\*(R" per se: rather, they
are simply assertions of the content of the message.
From \s-1RFC\-2045\s0 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"
\&\s-1RFC\-2045\s0 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"
\&\s-1RFC\-2045\s0 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
\&\s-1CRLF\s0 is converted to a newline \*(L"\en\*(R".  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 \s-1QUIET\s0 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.