~ubuntu-branches/ubuntu/karmic/ocamlnet/karmic

« back to all changes in this revision

Viewing changes to doc/html/refman/Netencoding.QuotedPrintable.html

  • Committer: Bazaar Package Importer
  • Author(s): Stefano Zacchiroli
  • Date: 2005-04-15 08:47:01 UTC
  • mfrom: (1.2.1 upstream) (2.1.1 hoary)
  • Revision ID: james.westby@ubuntu.com-20050415084701-3sxqut7h5ftfm3jp
Tags: 1.0-1
* New upstream release
* Urgency set to medium (rational: bug fix/consolidation release)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<html>
 
2
<head>
 
3
<link rel="stylesheet" href="style.css" type="text/css">
 
4
<link rel="Start" href="index.html">
 
5
<link rel="previous" href="Netencoding.Base64.html">
 
6
<link rel="next" href="Netencoding.Q.html">
 
7
<link rel="Up" href="Netencoding.html">
 
8
<link title="Index of types" rel=Appendix href="index_types.html">
 
9
<link title="Index of exceptions" rel=Appendix href="index_exceptions.html">
 
10
<link title="Index of values" rel=Appendix href="index_values.html">
 
11
<link title="Index of class methods" rel=Appendix href="index_methods.html">
 
12
<link title="Index of classes" rel=Appendix href="index_classes.html">
 
13
<link title="Index of class types" rel=Appendix href="index_class_types.html">
 
14
<link title="Index of modules" rel=Appendix href="index_modules.html">
 
15
<link title="Netconversion" rel="Chapter" href="Netconversion.html">
 
16
<link title="Netchannels" rel="Chapter" href="Netchannels.html">
 
17
<link title="Netstream" rel="Chapter" href="Netstream.html">
 
18
<link title="Mimestring" rel="Chapter" href="Mimestring.html">
 
19
<link title="Netmime" rel="Chapter" href="Netmime.html">
 
20
<link title="Netsendmail" rel="Chapter" href="Netsendmail.html">
 
21
<link title="Neturl" rel="Chapter" href="Neturl.html">
 
22
<link title="Netaddress" rel="Chapter" href="Netaddress.html">
 
23
<link title="Netbuffer" rel="Chapter" href="Netbuffer.html">
 
24
<link title="Netdate" rel="Chapter" href="Netdate.html">
 
25
<link title="Netencoding" rel="Chapter" href="Netencoding.html">
 
26
<link title="Netulex" rel="Chapter" href="Netulex.html">
 
27
<link title="Netaccel" rel="Chapter" href="Netaccel.html">
 
28
<link title="Netaccel_link" rel="Chapter" href="Netaccel_link.html">
 
29
<link title="Nethtml" rel="Chapter" href="Nethtml.html">
 
30
<link title="Netstring_str" rel="Chapter" href="Netstring_str.html">
 
31
<link title="Netstring_pcre" rel="Chapter" href="Netstring_pcre.html">
 
32
<link title="Netstring_mt" rel="Chapter" href="Netstring_mt.html">
 
33
<link title="Netmappings" rel="Chapter" href="Netmappings.html">
 
34
<link title="Netaux" rel="Chapter" href="Netaux.html">
 
35
<link title="Netcgi_env" rel="Chapter" href="Netcgi_env.html">
 
36
<link title="Netcgi_types" rel="Chapter" href="Netcgi_types.html">
 
37
<link title="Netcgi" rel="Chapter" href="Netcgi.html">
 
38
<link title="Netcgi_jserv" rel="Chapter" href="Netcgi_jserv.html">
 
39
<link title="Netcgi_jserv_ajp12" rel="Chapter" href="Netcgi_jserv_ajp12.html">
 
40
<link title="Netcgi_jserv_app" rel="Chapter" href="Netcgi_jserv_app.html">
 
41
<link title="Netcgi_fcgi_10" rel="Chapter" href="Netcgi_fcgi_10.html">
 
42
<link title="Netcgi_fcgi" rel="Chapter" href="Netcgi_fcgi.html">
 
43
<link title="Netpop" rel="Chapter" href="Netpop.html"><title>OcamlNet Reference Manual : Netencoding.QuotedPrintable</title>
 
44
</head>
 
45
<body>
 
46
<div class="navbar"><a href="Netencoding.Base64.html">Previous</a>
 
47
&nbsp;<a href="Netencoding.html">Up</a>
 
48
&nbsp;<a href="Netencoding.Q.html">Next</a>
 
49
</div>
 
50
<center><h1>Module <a href="type_Netencoding.QuotedPrintable.html">Netencoding.QuotedPrintable</a></h1></center>
 
51
<br>
 
52
<pre><span class="keyword">module</span> QuotedPrintable: <code class="code">sig</code> <a href="Netencoding.QuotedPrintable.html">..</a> <code class="code">end</code></pre><hr width="100%">
 
53
<br>
 
54
This module implements the "Quoted Printable" encoding as
 
55
 described in RFC 2045.
 
56
<p>
 
57
 
 
58
 This implementation assumes that the encoded string has a text MIME
 
59
 type. On input both CR/LF and LF are accepted as end-of-line (eol) terminators,
 
60
 but the output normalizes the eol delimiter as the <code class="code">crlf</code> argument
 
61
 specifies. Note that this implies that<ul>
 
62
<li>If <code class="code">crlf</code>, the output uses CR/LF as line separator as MIME prescribes</li>
 
63
<li>the encoding is not invertible for binary data</li>
 
64
</ul>
 
65
<br>
 
66
<pre><span class="keyword">val</span> <a name="VALencode"></a>encode : <code class="type">?crlf:bool -> ?pos:int -> ?len:int -> string -> string</code></pre><div class="info">
 
67
Encodes the string and returns it.
 
68
<p>
 
69
 
 
70
 Since OcamlNet 0.98, soft line breaks are added to the output
 
71
 to ensure that all output lines have a length &lt;= 76 bytes.
 
72
<p>
 
73
 
 
74
 Note unsafe characters:
 
75
   As recommended by RFC 2045, the characters <code class="code">!#$@[]^`{|}~</code>
 
76
   and the double quotes
 
77
   are additionally represented as hex tokens.        
 
78
   Furthermore, the letter 'F' is considered as unsafe if it
 
79
   occurs at the beginning of the line, so the encoded text
 
80
   never contains the word "From" at the beginning of a line.
 
81
<p>
 
82
 
 
83
 If <code class="code">pos</code> and/or <code class="code">len</code> are passed, only the substring starting at
 
84
 <code class="code">pos</code> (default: 0) with length <code class="code">len</code> (default: rest of the string)
 
85
 is encoded.
 
86
<p>
 
87
 
 
88
 If <code class="code">crlf</code> is set (the default), the output text uses CR/LF as
 
89
 line separator. Otherwise only LF is used.<br>
 
90
</div>
 
91
<pre><span class="keyword">val</span> <a name="VALdecode"></a>decode : <code class="type">?pos:int -> ?len:int -> string -> string</code></pre><div class="info">
 
92
Decodes the string and returns it.
 
93
<p>
 
94
 
 
95
 Most format errors cause an <code class="code">Invalid_argument</code> exception.
 
96
<p>
 
97
 
 
98
 If <code class="code">pos</code> and/or <code class="code">len</code> are passed, only the substring starting at
 
99
 <code class="code">pos</code> (default: 0) with length <code class="code">len</code> (default: rest of the string)
 
100
 is decoded.<br>
 
101
</div>
 
102
<pre><span class="keyword">class</span> <a name="TYPEencoding_pipe"></a><a href="Netencoding.QuotedPrintable.encoding_pipe.html">encoding_pipe</a> : <code class="type">?crlf:bool -> unit -> </code><code class="type"><a href="Netchannels.pipe.html">Netchannels.pipe</a></code></pre><div class="info">
 
103
This pipe encodes the data written into the pipe.
 
104
</div>
 
105
<pre><span class="keyword">class</span> <a name="TYPEdecoding_pipe"></a><a href="Netencoding.QuotedPrintable.decoding_pipe.html">decoding_pipe</a> : <code class="type">unit -> </code><code class="type"><a href="Netchannels.pipe.html">Netchannels.pipe</a></code></pre><div class="info">
 
106
This pipe decodes the data written into the pipe.
 
107
</div>
 
108
</body></html>
 
 
b'\\ No newline at end of file'