/usr/share/doc/libtext-ocaml-dev/api/Encoding.html is in libtext-ocaml-dev 0.6-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<link rel="stylesheet" href="style.css" type="text/css">
<meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type">
<link rel="Start" href="index.html">
<link rel="previous" href="Text.html">
<link rel="Up" href="index.html">
<link title="Index of types" rel=Appendix href="index_types.html">
<link title="Index of exceptions" rel=Appendix href="index_exceptions.html">
<link title="Index of values" rel=Appendix href="index_values.html">
<link title="Index of modules" rel=Appendix href="index_modules.html">
<link title="Text" rel="Chapter" href="Text.html">
<link title="Encoding" rel="Chapter" href="Encoding.html"><link title="Decoding" rel="Section" href="#6_Decoding">
<link title="Encoding" rel="Section" href="#6_Encoding">
<title>Encoding</title>
</head>
<body>
<div class="navbar"><a class="pre" href="Text.html" title="Text">Previous</a>
<a class="up" href="index.html" title="Index">Up</a>
</div>
<h1>Module <a href="type_Encoding.html">Encoding</a></h1>
<pre><span class="keyword">module</span> Encoding: <code class="code">sig</code> <a href="Encoding.html">..</a> <code class="code">end</code></pre><div class="info module top">
<h6 id="6_Characterencodings">Character encodings</h6><br>
</div>
<hr width="100%">
<pre><span id="TYPEt"><span class="keyword">type</span> <code class="type"></code>t</span> = <code class="type">string</code> </pre>
<div class="info ">
Type of a character encoding<br>
</div>
<pre><span id="VALequal"><span class="keyword">val</span> equal</span> : <code class="type"><a href="Encoding.html#TYPEt">t</a> -> <a href="Encoding.html#TYPEt">t</a> -> bool</code></pre><div class="info ">
<code class="code">equal e1 e2</code> returns whether <code class="code">e1</code> and <code class="code">e2</code> denotes the same
encoding. It does a caseless comparison of <code class="code">e1</code> or <code class="code">e2</code> without
optionnal suffixes ("//IGNORE" or "//TRANSLIT").<br>
</div>
<pre><span id="VALsystem"><span class="keyword">val</span> system</span> : <code class="type"><a href="Encoding.html#TYPEt">t</a></code></pre><div class="info ">
The character encoding used by the system<br>
</div>
<pre><span id="TYPEcode_point"><span class="keyword">type</span> <code class="type"></code>code_point</span> = <code class="type">int</code> </pre>
<div class="info ">
Type of a unicode code-point.<br>
</div>
<pre><span id="VALrecode_string"><span class="keyword">val</span> recode_string</span> : <code class="type">src:<a href="Encoding.html#TYPEt">t</a> -> dst:<a href="Encoding.html#TYPEt">t</a> -> string -> string</code></pre><div class="info ">
<code class="code">recode_string ~src ~dst str</code> recode <code class="code">str</code> from <code class="code">src</code> encoding
to <code class="code">dst</code> encoding.<br>
</div>
<br>
<h6 id="6_Decoding">Decoding</h6><br>
<pre><span id="TYPEdecoder"><span class="keyword">type</span> <code class="type"></code>decoder</span> </pre>
<div class="info ">
Type of a decoder<br>
</div>
<pre><span id="VALdecoder"><span class="keyword">val</span> decoder</span> : <code class="type"><a href="Encoding.html#TYPEt">t</a> -> <a href="Encoding.html#TYPEdecoder">decoder</a></code></pre><div class="info ">
Creates a decoder from an encoding-name<br>
</div>
<pre><code><span id="TYPEdecoding_result"><span class="keyword">type</span> <code class="type"></code>decoding_result</span> = </code></pre><table class="typetable">
<tr>
<td align="left" valign="top" >
<code><span class="keyword">|</span></code></td>
<td align="left" valign="top" >
<code><span id="TYPEELTdecoding_result.Dec_ok"><span class="constructor">Dec_ok</span></span> <span class="keyword">of</span> <code class="type"><a href="Encoding.html#TYPEcode_point">code_point</a> * int</code></code></td>
<td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" ><code class="code">Dec_ok(code, num)</code> means that the operation succeed. <code class="code">code</code>
is the unicode code-point read and <code class="code">num</code> is the number of
bytes read by the decoder.</td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td>
</tr>
<tr>
<td align="left" valign="top" >
<code><span class="keyword">|</span></code></td>
<td align="left" valign="top" >
<code><span id="TYPEELTdecoding_result.Dec_need_more"><span class="constructor">Dec_need_more</span></span></code></td>
<td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" ><code class="code">Dec_not_finished</code> means that the input contains a
not-terminated sequence</td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td>
</tr>
<tr>
<td align="left" valign="top" >
<code><span class="keyword">|</span></code></td>
<td align="left" valign="top" >
<code><span id="TYPEELTdecoding_result.Dec_error"><span class="constructor">Dec_error</span></span></code></td>
<td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" ><code class="code">Dec_error</code> means that the input contains an invalid sequence</td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td>
</tr></table>
<div class="info ">
Result of a decoding operation<br>
</div>
<pre><span id="VALdecode"><span class="keyword">val</span> decode</span> : <code class="type"><a href="Encoding.html#TYPEdecoder">decoder</a> -> string -> int -> int -> <a href="Encoding.html#TYPEdecoding_result">decoding_result</a></code></pre><div class="info ">
<code class="code">decode decoder buffer ptr len</code> decodes with <code class="code">decoder</code> bytes at
position <code class="code">ptr</code> in <code class="code">buffer</code><br>
</div>
<br>
<h6 id="6_Encoding">Encoding</h6><br>
<pre><span id="TYPEencoder"><span class="keyword">type</span> <code class="type"></code>encoder</span> </pre>
<div class="info ">
Type of an encoder<br>
</div>
<pre><span id="VALencoder"><span class="keyword">val</span> encoder</span> : <code class="type"><a href="Encoding.html#TYPEt">t</a> -> <a href="Encoding.html#TYPEencoder">encoder</a></code></pre><div class="info ">
Creates an encoder from an encoding-name<br>
</div>
<pre><code><span id="TYPEencoding_result"><span class="keyword">type</span> <code class="type"></code>encoding_result</span> = </code></pre><table class="typetable">
<tr>
<td align="left" valign="top" >
<code><span class="keyword">|</span></code></td>
<td align="left" valign="top" >
<code><span id="TYPEELTencoding_result.Enc_ok"><span class="constructor">Enc_ok</span></span> <span class="keyword">of</span> <code class="type">int</code></code></td>
<td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" ><code class="code">Enc_ok num</code> means that the operation succeed and <code class="code">num</code>
bytes have been written.</td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td>
</tr>
<tr>
<td align="left" valign="top" >
<code><span class="keyword">|</span></code></td>
<td align="left" valign="top" >
<code><span id="TYPEELTencoding_result.Enc_need_more"><span class="constructor">Enc_need_more</span></span></code></td>
<td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" ><code class="code">Enc_need_more</code> means that there is not enough space in the
output to ouput all bytes.</td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td>
</tr>
<tr>
<td align="left" valign="top" >
<code><span class="keyword">|</span></code></td>
<td align="left" valign="top" >
<code><span id="TYPEELTencoding_result.Enc_error"><span class="constructor">Enc_error</span></span></code></td>
<td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" ><code class="code">Enc_error</code> means that the given code-point cannot be
encoded in the given encoding</td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td>
</tr></table>
<div class="info ">
Result of an encoding operation<br>
</div>
<pre><span id="VALencode"><span class="keyword">val</span> encode</span> : <code class="type"><a href="Encoding.html#TYPEencoder">encoder</a> -><br> string -> int -> int -> <a href="Encoding.html#TYPEcode_point">code_point</a> -> <a href="Encoding.html#TYPEencoding_result">encoding_result</a></code></pre><div class="info ">
<code class="code">encode decoder buffer ptr len code</code> encodes <code class="code">code</code> with
<code class="code">encoder</code> at position <code class="code">ptr</code> in <code class="code">buffer</code><br>
</div>
</body></html>
|