⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 uuencode.html

📁 unix 下的C开发手册,还用详细的例程。
💻 HTML
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><html><head><!-- Copyright 1997 The Open Group, All Rights Reserved --><title>uuencode</title></head><body bgcolor=white><center><font size=2>The Single UNIX &reg; Specification, Version 2<br>Copyright &copy; 1997 The Open Group</font></center><hr size=2 noshade><h4><a name = "tag_001_014_2657">&nbsp;</a>NAME</h4><blockquote>uuencode - encode a binary file</blockquote><h4><a name = "tag_001_014_2658">&nbsp;</a>SYNOPSIS</h4><blockquote><pre><code>uuencode <b>[</b><i>file</i><b>]</b><i> decode_pathname</i></code></pre></blockquote><h4><a name = "tag_001_014_2659">&nbsp;</a>DESCRIPTION</h4><blockquote>The<i>uuencode</i>utility writes an encoded version ofthe named input file, or standard input if no<i>file</i>is specified,to standard output.The output is encoded usingthe algorithm described in the STDOUT section and includes thefile access permission bits (in<i><a href="chmod.html">chmod</a></i>octal or symbolic notation)of the input file and the<i>decode_pathname</i>,for re-creation of the file on anothersystem that conforms to this specification.</blockquote><h4><a name = "tag_001_014_2660">&nbsp;</a>OPTIONS</h4><blockquote>None.</blockquote><h4><a name = "tag_001_014_2661">&nbsp;</a>OPERANDS</h4><blockquote>The following operands are supported:<dl compact><dt><i>decode_pathname</i><dd>The pathname of the file into which the<i><a href="uudecode.html">uudecode</a></i>utilitywill place the decoded file.If there are characters in<i>decode_pathname</i>that are not in theportable filename character setthe results are unspecified.<dt><i>file</i><dd>A pathname of the file to be encoded.</dl></blockquote><h4><a name = "tag_001_014_2662">&nbsp;</a>STDIN</h4><blockquote>See the INPUT FILES section.</blockquote><h4><a name = "tag_001_014_2663">&nbsp;</a>INPUT FILES</h4><blockquote>Input files can be files of any type.</blockquote><h4><a name = "tag_001_014_2664">&nbsp;</a>ENVIRONMENT VARIABLES</h4><blockquote>The following environment variables affect the execution of<i>uuencode</i>:<dl compact><dt><i>LANG</i><dd>Provide a default value for the internationalisation variablesthat are unset or null.If<i>LANG</i>is unset or null, the corresponding value from theimplementation-dependent default locale will be used.If any of the internationalisation variables contains an invalid setting, theutility will behave as if none of the variables had been defined.<dt><i>LC_ALL</i><dd>If set to a non-empty string value,override the values of all the other internationalisation variables.<dt><i>LC_CTYPE</i><dd>Determine thelocale for the interpretation of sequences of bytes of text data ascharacters (for example, single- as opposed to multi-byte charactersin arguments and input files).<dt><i>LC_MESSAGES</i><dd>Determine the locale that should be used to affectthe format and contents of diagnosticmessages written to standard error.<dt><i>NLSPATH</i><dd>Determine the location of message cataloguesfor the processing of<i>LC_MESSAGES .</i></dl></blockquote><h4><a name = "tag_001_014_2665">&nbsp;</a>ASYNCHRONOUS EVENTS</h4><blockquote>Default.</blockquote><h4><a name = "tag_001_014_2666">&nbsp;</a>STDOUT</h4><blockquote>The standard output is a text file (encoded in thecharacter set of the current locale)that begins with the line:<p><code><tt>"begin<img src="../images/delta.gif" border=0>%s<img src="../images/delta.gif" border=0>%s\n"</tt>, &lt;<i>mode</i>&gt;,<i>decode_pathname</i></code>and ends with the line:<p><code>end\n</code><p>In both cases, the lines have no preceding or trailingblank characters.<p>The algorithm that is used for lines in between<b>begin</b>and<b>end</b>takes three octets as inputand writes four characters of output by splitting the input at six-bitintervals into four octets, containing data in the lower six bits only.These octets are converted to characters by addinga value of 0x20to each octet, so that each octetis in the range 0x20-0x5f, and thenit is assumed torepresent a printable character in the ISO/IEC&nbsp;646:1991 standardencoded character set.It then will be translated into the correspondingcharacter codes for the codeset in use in the current locale.(For example, the octet 0x41, representingA,would be translated toAin the current codeset, such as 0xc1 if it were EBCDIC.)<p>Where the bits of two octets are combined, the least significant bits ofthe first octet are shifted left and combined with the most significantbits of the second octet shifted right.Thus the three octets A, B, C are converted into the four octets:<pre><code>0x20 + (( A &gt;&gt; 2                    ) &amp; 0x3F)0x20 + (((A &lt;&lt; 4) ' |' ((B &gt;&gt; 4) &amp; 0xF)) &amp; 0x3F)0x20 + (((B &lt;&lt; 2) ' |' ((C &gt;&gt; 6) &amp; 0x3)) &amp; 0x3F)0x20 + (( C                         ) &amp; 0x3F)</code></pre>These octets are then translated into the local character set.<p>Each encoded line contains a length character, equal to the numberof characters to be decoded plus 0x20 translated to the localcharacter set as described above, followed by the encodedcharacters.The maximum number of octets to be encoded on each line is 45.</blockquote><h4><a name = "tag_001_014_2667">&nbsp;</a>STDERR</h4><blockquote>Used only for diagnostic messages.</blockquote><h4><a name = "tag_001_014_2668">&nbsp;</a>OUTPUT FILES</h4><blockquote>None.</blockquote><h4><a name = "tag_001_014_2669">&nbsp;</a>EXTENDED DESCRIPTION</h4><blockquote>None.</blockquote><h4><a name = "tag_001_014_2670">&nbsp;</a>EXIT STATUS</h4><blockquote>The following exit values are returned:<dl compact><dt>0<dd>Successful completion.<dt>&gt;0<dd>An error occurred.</dl></blockquote><h4><a name = "tag_001_014_2671">&nbsp;</a>CONSEQUENCES OF ERRORS</h4><blockquote>Default.</blockquote><h4><a name = "tag_001_014_2672">&nbsp;</a>APPLICATION USAGE</h4><blockquote>The file is expanded by 35 percent(each three octets become four, plus control information)causing it to take longer to transmit.<p>Since this utility is intended to create files tobe used for data interchange between systems with possiblydifferent codesets,and to represent binary data as a text file,the ISO/IEC&nbsp;646:1991 standardwas chosen for a midpoint in the algorithm as a known reference point.The output from<i>uuencode</i>is a text file on the local system.If the output were in the ISO/IEC&nbsp;646:1991 standardcodeset, it might not be a text file (at least because thenewline charactersmight not match), and the goal of creating a text filewould be defeated.If this text file was then carried to another machinewith the same codeset, it would be perfectly compatiblewith that system's<i><a href="uudecode.html">uudecode</a></i>.If it was transmitted over a mail systemor sent to a machine with a different codeset,it is assumed that, as for every other text file, some translation mechanismwould convert it (by the time it reached a user on the other system) into anappropriate codeset.This translation only makes sense from the localcodeset, not if the file has been put into a ISO/IEC&nbsp;646:1991 standardrepresentation first.Similarly, files processed by<i>uuencode</i>can be placed in<i><a href="pax.html">pax</a></i>archives, intermixed with other text files in the same codeset.<p>The algorithm is described in terms of 8-bit quantities, or octets.Since no byte alignment is implied, it will encode data from machineswith any number of bits per byte.However, unless that encoded data is then decoded on amachine with the same number of bits per byte,the output might not be useful.</blockquote><h4><a name = "tag_001_014_2673">&nbsp;</a>EXAMPLES</h4><blockquote>None.</blockquote><h4><a name = "tag_001_014_2674">&nbsp;</a>FUTURE DIRECTIONS</h4><blockquote>None.</blockquote><h4><a name = "tag_001_014_2675">&nbsp;</a>SEE ALSO</h4><blockquote><i><a href="mailx.html">mailx</a></i>,<i><a href="uudecode.html">uudecode</a></i>.</blockquote><hr size=2 noshade><center><font size=2>UNIX &reg; is a registered Trademark of The Open Group.<br>Copyright &copy; 1997 The Open Group<br> [ <a href="../index.html">Main Index</a> | <a href="../xshix.html">XSH</a> | <a href="../xcuix.html">XCU</a> | <a href="../xbdix.html">XBD</a> | <a href="../cursesix.html">XCURSES</a> | <a href="../xnsix.html">XNS</a> ]</font></center><hr size=2 noshade></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -