Sophie

Sophie

distrib > Fedora > 14 > x86_64 > media > updates > by-pkgid > 71d40963b505df4524269198e237b3e3 > files > 648

virtuoso-opensource-doc-6.1.4-2.fc14.noarch.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
 <head profile="http://internetalchemy.org/2003/02/profile">
  <link rel="foaf" type="application/rdf+xml" title="FOAF" href="http://www.openlinksw.com/dataspace/uda/about.rdf" />
  <link rel="schema.dc" href="http://purl.org/dc/elements/1.1/" />
  <meta name="dc.title" content="Function: uudecode - Virtuoso Functions Guide" />
  <meta name="dc.subject" content="Function: uudecode - Virtuoso Functions Guide" />
  <meta name="dc.creator" content="OpenLink Software Documentation Team ;&#10;" />
  <meta name="dc.copyright" content="OpenLink Software, 1999 - 2009" />
  <link rel="top" href="index.html" title="OpenLink Virtuoso Universal Server: Documentation" />
  <link rel="search" href="/doc/adv_search.vspx" title="Search OpenLink Virtuoso Universal Server: Documentation" />
  <link rel="parent" href="functions.html" title="Chapter Contents" />
  <link rel="prev" href="appendixa.html" title="Appendix" />
  <link rel="next" href="functions.html#.html" title="" />
  <link rel="shortcut icon" href="../images/misc/favicon.ico" type="image/x-icon" />
  <link rel="stylesheet" type="text/css" href="doc.css" />
  <link rel="stylesheet" type="text/css" href="/doc/translation.css" />
  <title>Function: uudecode - Virtuoso Functions Guide</title>
  <meta http-equiv="Content-Type" content="text/xhtml; charset=UTF-8" />
  <meta name="author" content="OpenLink Software Documentation Team ;&#10;" />
  <meta name="copyright" content="OpenLink Software, 1999 - 2009" />
  <meta name="keywords" content="" />
  <meta name="GENERATOR" content="OpenLink XSLT Team" />
 </head>
 <body>
  <div id="header">
    <a name="fn_uudecode" />
    <img src="../images/misc/logo.jpg" alt="" />
    <h1>22. Virtuoso Functions Guide - uudecode</h1>
  </div>
  <div id="navbartop">
   <div>
      <a class="link" href="functions.html">Chapter Contents</a> | <a class="link" href="fn_split_and_decode.html" title="split_and_decode">Prev</a> | <a class="link" href="fn_uuencode.html" title="uuencode">Next</a>
   </div>
  </div>
  <div id="currenttoc">
   <form method="post" action="/doc/adv_search.vspx">
    <div class="search">Keyword Search: <br />
        <input type="text" name="q" /> <input type="submit" name="go" value="Go" />
    </div>
   </form>
   <div>
      <a href="http://www.openlinksw.com/">www.openlinksw.com</a>
   </div>
   <div>
      <a href="http://docs.openlinksw.com/">docs.openlinksw.com</a>
   </div>
    <br />
   <div>
      <a href="index.html">Book Home</a>
   </div>
    <br />
   <div>
      <a href="contents.html">Contents</a>
   </div>
   <div>
      <a href="preface.html">Preface</a>
   </div>
    <br />
   <div>
      <a class="selected" href="functions.html">Virtuoso Functions Guide</a>
   </div>
    <br />
   <div>
      <a href="functions.html#admin">Administration</a>
   </div>
   <div>
      <a href="functions.html#aggr">Aggregate Functions</a>
   </div>
   <div>
      <a href="functions.html#array">Array Manipulation</a>
   </div>
   <div>
      <a href="functions.html#bpel">BPEL APIs</a>
   </div>
   <div>
      <a href="functions.html#backup">Backup</a>
   </div>
   <div>
      <a href="functions.html#compression">Compression</a>
   </div>
   <div>
      <a href="functions.html#cursors">Cursor</a>
   </div>
   <div>
      <a href="functions.html#time">Date &amp; Time Manipulation</a>
   </div>
   <div>
      <a href="functions.html#debug">Debug</a>
   </div>
   <div>
      <a href="functions.html#dict">Dictionary Manipulation</a>
   </div>
   <div>
      <a class="selected" href="functions.html#encoding">Encoding &amp; Decoding</a>
   </div>
   <div class="selected">
    <div>
        <a href="fn_encode_base64.html">encode_base64</a>
    </div>
    <div>
        <a href="fn_split_and_decode.html">split_and_decode</a>
    </div>
    <div>
        <a class="selected" href="fn_uudecode.html">uudecode</a>
    </div>
    <div>
        <a href="fn_uuencode.html">uuencode</a>
    </div>
   </div>
   <div>
      <a href="functions.html#file">File Manipulation</a>
   </div>
   <div>
      <a href="functions.html#ft">Free Text</a>
   </div>
   <div>
      <a href="functions.html#hash">Hashing / Cryptographic</a>
   </div>
   <div>
      <a href="functions.html#ldap">LDAP</a>
   </div>
   <div>
      <a href="functions.html#localization">Locale</a>
   </div>
   <div>
      <a href="functions.html#mail">Mail</a>
   </div>
   <div>
      <a href="functions.html#misc">Miscellaneous</a>
   </div>
   <div>
      <a href="functions.html#number">Number</a>
   </div>
   <div>
      <a href="functions.html#phrz">Phrases</a>
   </div>
   <div>
      <a href="functions.html#rdf">RDF data</a>
   </div>
   <div>
      <a href="functions.html#rmt">Remote SQL Data Source</a>
   </div>
   <div>
      <a href="functions.html#repl">Replication</a>
   </div>
   <div>
      <a href="functions.html#soap">SOAP</a>
   </div>
   <div>
      <a href="functions.html#sql">SQL</a>
   </div>
   <div>
      <a href="functions.html#string">String</a>
   </div>
   <div>
      <a href="functions.html#txn">Transaction</a>
   </div>
   <div>
      <a href="functions.html#type">Type Mapping</a>
   </div>
   <div>
      <a href="functions.html#uddi">UDDI</a>
   </div>
   <div>
      <a href="functions.html#udt">User Defined Types &amp; The CLR</a>
   </div>
   <div>
      <a href="functions.html#vad">VAD</a>
   </div>
   <div>
      <a href="functions.html#jvmpl">Virtuoso Java PL API</a>
   </div>
   <div>
      <a href="functions.html#bif">Virtuoso Server Extension Interface (VSEI)</a>
   </div>
   <div>
      <a href="functions.html#ws">Web &amp; Internet</a>
   </div>
   <div>
      <a href="functions.html#xml">XML</a>
   </div>
   <div>
      <a href="functions.html#XPATH">XPATH &amp; XQUERY</a>
   </div>
    <br />
   <div>
      <a href="functionidx.html">Functions Index</a>
   </div>
    <br />
  </div>
  <div id="text">
    <h2>uudecode</h2>
    <div class="refpurpose">Decodes a string previously encoded by uuencode</div>
    <div class="funcsynopsis">
        <span class="funcdef">
     <span class="function">uudecode</span>
     </span>
	(<span class="paramdef">in <span class="parameter">input</span> string</span>, 
	<span class="paramdef">in <span class="parameter">mode</span> integer</span>);
      </div>
  
  
  
  <div class="refsect1">
      <div class="refsect1title">Description</div>
    <p>
Uudecode transforms uuencoded data into original form.
Uuencode may return a number of sections as a vector of them,
each of these sections should be decoded by separate call and results
should be concatenated in order to compose original text.
The mode of decoding should match to the mode used for encoding, of course.
    </p>
    <p>
RFC 2045,
(N. Borenstein, N. Freed.
MIME (Multipurpose Internet Mail Extensions) Part One:
The Format of Internet Message Bodies),
contains detailed description of most important encodings used by mail
systems.
Older RFC 1521 is now obsoleted.
    </p>
    <p>
Currently, eight conventions are used for mail attachments.
In Virtuoso, they are enumerated by integer IDs.
    </p>
    <table class="data">
      
       <tr>
          <th class="data">ID</th>
          <th class="data">Standard</th>
          <th class="data">Description</th>
        </tr>
	
	  <tr>
	    <td class="data">1</td>
          <td class="data">&quot;Native&quot; UUencode</td>
	    <td class="data">
Optional header is one line started by &quot;begin &quot; or &quot;&lt;pre&gt;begin &quot; keyword, with some system-specific data after it.
Optional footer is one line started by &quot;end&quot; keyword.
	    </td>
	  </tr>
	  <tr>
	    <td class="data">2</td>
          <td class="data">Base-64, UNIX version</td>
	    <td class="data">
There are no agreements about headers or footers.
	    </td>
	  </tr>
	  <tr>
	    <td class="data">3</td>
          <td class="data">Base-64, MIME version</td>
	    <td class="data">
This standard is very similar to &quot;Base-64, UNIX version&quot;.
Virtuoso, like all modern mail clients,
feel no difference between them when decode sections, because
the only difference is in the number of data bytes per line.
	    </td>
	  </tr>
	  <tr>
	    <td class="data">4</td>
          <td class="data">XXencode</td>
	    <td class="data">
This standard is an obsolete standard, similar to Unicode,
but not compatible.
There are no agreements about headers or footers.
	    </td>
	  </tr>
	  <tr>
	    <td class="data">5</td>
          <td class="data">BinHex</td>
	    <td class="data">
There are no header or footer lines, but first line of every
section should be prefixed by colon (&#39;:&#39;) character.
	    </td>
	  </tr>
	  <tr>
	    <td class="data">6-9</td>
          <td class="data">reserved</td>
	    <td class="data">
More standards may be used in the future. It is unsafe to
assume that all existing standards are listed here.
Real application will often receive messages with unknown or
misspelled encodings&#39; names, syntax errors in data etc.
	    </td>
	  </tr>
	  <tr>
	    <td class="data">10</td>
          <td class="data">MIME Plain-Text</td>
	    <td class="data">
This &quot;encoding&quot; is suitable only for texts.
They are stored &quot;as is&quot;, but line ends will not be preserved.
	    </td>
	  </tr>
	  <tr>
	    <td class="data">11</td>
          <td class="data">MIME Quoted-Printable (for texts)</td>
	    <td class="data">
This encoding is suitable for any sort of textual data,
because ASCII printable characters are stored
&quot;as is&quot; and only nonprintable characters are encoded.
UNIX linefeeds (LF chars) will be encoded as &quot;hard breaks&quot;, so decoding
side may convert them into its own system-specific &quot;line end&quot; chars, e.g.
in CRLF sequence.
	    </td>
	  </tr>
	  <tr>
	    <td class="data">12</td>
          <td class="data">MIME Quoted-Printable (for binaries)</td>
	    <td class="data">
This encoding is suitable for any sort of data but it is especially
useful for textual data, because ASCII printable characters are stored
&quot;as is&quot; and only nonprintable characters are encoded.
No &quot;hard breaks&quot; will be used for UNIX linefeeds (LF chars) of source file,
so the file will be decoded exactly as it was encoded, no matter which
character sequence is used for &quot;line end&quot; in the decoder&#39;s OS.
When in trouble, whether the data encoded are text or binary, use
this variant (&quot;for binaries&quot;): text may be easily recovered by recipient
if linefeeds are wrong whereas binary data will become unusable if encoded as text.
	    </td>
	  </tr>
	
      
    </table>
      <br />
    <p>
If there&#39;s no information about the encoding used in the message,
zero may be passed to the uudecode() function instead of proper ID.
uudecode() will try to guess the proper algorithm.
In any case, decoder feels no difference between modes 2 and 3
(two slightly different &quot;Base64&quot; encodings) and between modes
11 and 12 (two &quot;Quoted-Printable&quot; methods which are different
only encoding side).
Application may try all methods in turn if automatic guess will fail.
    </p>
  </div>
  <div class="refsect1">
      <div class="refsect1title">Parameters</div>
    <div class="refsect2">
        <span class="refsect2title">input – </span>
      String or string-output session with data to be encoded.</div>
    <div class="refsect2">
        <span class="refsect2title">mode – </span>
      Integer ID of encoding to be used.</div>
  </div>
  <div class="refsect1">
      <div class="refsect1title">Return Types</div>
      <p>
Vector of strings, where every string contains all data lines of a section.
</p>
    </div>
  <div class="refsect1title">Errors</div>
    <table class="data">
      
       <tr>
        <th class="data">SQLState</th>
        <th class="data">Error Code</th>
        <th class="data">Error Text</th>
        <th class="data">Description</th>
      </tr>
	
	  <tr>
	    <td class="data">
          <a name="err22003" />
          <span class="errorcode">22003</span>
        </td>
	    <td class="data">
          <a name="errUUD01" />
          <span class="errorcode">UUD01</span>
        </td>
	    <td class="data">
          <span class="errorname">Unsupported type of UU-encoding (...)</span>
        </td>
	    <td class="data" />
	  </tr>
	  <tr>
	    <td class="data">
          <a name="err22003" />
          <span class="errorcode">22003</span>
        </td>
	    <td class="data">
          <a name="errUUD02" />
          <span class="errorcode">UUD02</span>
        </td>
	    <td class="data">
          <span class="errorname">Data string contains errors [...]</span>
        </td>
	    <td class="data" />
	  </tr>
	  <tr>
	    <td class="data">
          <a name="err22003" />
          <span class="errorcode">22003</span>
        </td>
	    <td class="data">
          <a name="errUUD03" />
          <span class="errorcode">UUD03</span>
        </td>
	    <td class="data">
          <span class="errorname">Encoded data ended prematurely</span>
        </td>
	    <td class="data" />
	  </tr>
	  <tr>
	    <td class="data">
          <a name="err22003" />
          <span class="errorcode">22003</span>
        </td>
	    <td class="data">
          <a name="errUUD04" />
          <span class="errorcode">UUD04</span>
        </td>
	    <td class="data">
          <span class="errorname">No data found to be decoded</span>
        </td>
	    <td class="data" />
	  </tr>
	
      
    </table>
    <br />
  <p />
  <div class="refsect1">
      <div class="refsect1title">Examples</div>
    <a name="ex_uudecode" />
      <div class="example">
        <div class="exampletitle">Encoding with auto-detection of the encoding type</div>
      <p>The function gets a string &#39;Hello&#39; in BinHex encoding and zero to let it guess that the encoding is BinHex. The call returns &#39;Hello&#39;.</p>
      <div>
          <pre class="screen">
-- note doubled single quotes inside string literal
select uudecode (&#39;:5&#39;&#39;9XE&#39;&#39;m:&#39;, 0);
Hello
</pre>
        </div>
    </div>
  </div>
  <div class="refsect1">
      <div class="refsect1title">See Also</div>
    <p>
      <a href="fn_uuvalidate.html">uuencode</a>,
      <a href="fn_uuvalidate.html">uuvalidate</a>
    </p>
  </div>
</div>
  <div id="footer">
    <div>Copyright© 1999 - 2009 OpenLink Software All rights reserved.</div>
   <div id="validation">
    <a href="http://validator.w3.org/check/referer">
        <img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!" height="31" width="88" />
    </a>
    <a href="http://jigsaw.w3.org/css-validator/">
        <img src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!" height="31" width="88" />
    </a>
   </div>
  </div>
 </body>
</html>