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 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>pr29</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.75.0">
<link rel="home" href="index.html" title="GNU Libidn API Reference Manual">
<link rel="up" href="ch01.html" title="GNU Libidn API Reference Manual">
<link rel="prev" href="libidn-idna.html" title="idna">
<link rel="next" href="libidn-punycode.html" title="punycode">
<meta name="generator" content="GTK-Doc V1.11 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
<link rel="chapter" href="ch01.html" title="GNU Libidn API Reference Manual">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="libidn-idna.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="ch01.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">GNU Libidn API Reference Manual</th>
<td><a accesskey="n" href="libidn-punycode.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#libidn-pr29.synopsis" class="shortcut">Top</a>
|
<a href="#libidn-pr29.description" class="shortcut">Description</a>
</td></tr>
</table>
<div class="refentry" title="pr29">
<a name="libidn-pr29"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="libidn-pr29.top_of_page"></a>pr29</span></h2>
<p>pr29</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv" title="Synopsis">
<a name="libidn-pr29.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">
#define <a class="link" href="libidn-idna.html#IDNAPI--CAPS" title="IDNAPI">IDNAPI</a>
enum <a class="link" href="libidn-pr29.html#Pr29-rc" title="enum Pr29_rc">Pr29_rc</a>;
const char * <a class="link" href="libidn-pr29.html#pr29-strerror" title="pr29_strerror ()">pr29_strerror</a> (<a class="link" href="libidn-pr29.html#Pr29-rc" title="enum Pr29_rc">Pr29_rc</a> rc);
int <a class="link" href="libidn-pr29.html#pr29-4" title="pr29_4 ()">pr29_4</a> (const uint32_t *in,
size_t len);
int <a class="link" href="libidn-pr29.html#pr29-4z" title="pr29_4z ()">pr29_4z</a> (const uint32_t *in);
int <a class="link" href="libidn-pr29.html#pr29-8z" title="pr29_8z ()">pr29_8z</a> (const char *in);
</pre>
</div>
<div class="refsect1" title="Description">
<a name="libidn-pr29.description"></a><h2>Description</h2>
<p>
</p>
</div>
<div class="refsect1" title="Details">
<a name="libidn-pr29.details"></a><h2>Details</h2>
<div class="refsect2" title="IDNAPI">
<a name="IDNAPI--CAPS"></a><h3>IDNAPI</h3>
<pre class="programlisting">#define IDNAPI</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2" title="enum Pr29_rc">
<a name="Pr29-rc"></a><h3>enum Pr29_rc</h3>
<pre class="programlisting"> typedef enum
{
PR29_SUCCESS = 0,
PR29_PROBLEM = 1, /* String is a problem sequence. */
PR29_STRINGPREP_ERROR = 2 /* Charset conversion failed (p29_8*). */
} Pr29_rc;
</pre>
<p>
Enumerated return codes for <a class="link" href="libidn-pr29.html#pr29-4" title="pr29_4 ()"><code class="function">pr29_4()</code></a>, <a class="link" href="libidn-pr29.html#pr29-4z" title="pr29_4z ()"><code class="function">pr29_4z()</code></a>, <a class="link" href="libidn-pr29.html#pr29-8z" title="pr29_8z ()"><code class="function">pr29_8z()</code></a>. The
value 0 is guaranteed to always correspond to success.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><a name="PR29-SUCCESS--CAPS"></a><span class="term"><code class="literal">PR29_SUCCESS</code></span></p></td>
<td> Successful operation. This value is guaranteed to
always be zero, the remaining ones are only guaranteed to hold
non-zero values, for logical comparison purposes.
</td>
</tr>
<tr>
<td><p><a name="PR29-PROBLEM--CAPS"></a><span class="term"><code class="literal">PR29_PROBLEM</code></span></p></td>
<td> A problem sequence was encountered.
</td>
</tr>
<tr>
<td><p><a name="PR29-STRINGPREP-ERROR--CAPS"></a><span class="term"><code class="literal">PR29_STRINGPREP_ERROR</code></span></p></td>
<td> The character set conversion failed (only
for <code class="function">pr29_8()</code> and <a class="link" href="libidn-pr29.html#pr29-8z" title="pr29_8z ()"><code class="function">pr29_8z()</code></a>).
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="pr29_strerror ()">
<a name="pr29-strerror"></a><h3>pr29_strerror ()</h3>
<pre class="programlisting">const char * pr29_strerror (<a class="link" href="libidn-pr29.html#Pr29-rc" title="enum Pr29_rc">Pr29_rc</a> rc);</pre>
<p>
Convert a return code integer to a text string. This string can be
used to output a diagnostic message to the user.
</p>
<p>
PR29_SUCCESS: Successful operation. This value is guaranteed to
always be zero, the remaining ones are only guaranteed to hold
non-zero values, for logical comparison purposes.
PR29_PROBLEM: A problem sequence was encountered.
PR29_STRINGPREP_ERROR: The character set conversion failed (only
for <code class="function">pr29_8()</code> and <a class="link" href="libidn-pr29.html#pr29-8z" title="pr29_8z ()"><code class="function">pr29_8z()</code></a>).</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>rc</code></em> :</span></p></td>
<td> an <a class="link" href="libidn-pr29.html#Pr29-rc" title="enum Pr29_rc"><span class="type">Pr29_rc</span></a> return code.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> Returns a pointer to a statically allocated string
containing a description of the error with the return code <em class="parameter"><code>rc</code></em>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="pr29_4 ()">
<a name="pr29-4"></a><h3>pr29_4 ()</h3>
<pre class="programlisting">int pr29_4 (const uint32_t *in,
size_t len);</pre>
<p>
Check the input to see if it may be normalized into different
strings by different NFKC implementations, due to an anomaly in the
NFKC specifications.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>in</code></em> :</span></p></td>
<td> input array with unicode code points.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>len</code></em> :</span></p></td>
<td> length of input array with unicode code points.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> Returns the <a class="link" href="libidn-pr29.html#Pr29-rc" title="enum Pr29_rc"><span class="type">Pr29_rc</span></a> value <a class="link" href="libidn-pr29.html#PR29-SUCCESS--CAPS"><code class="literal">PR29_SUCCESS</code></a> on success,
and <a class="link" href="libidn-pr29.html#PR29-PROBLEM--CAPS"><code class="literal">PR29_PROBLEM</code></a> if the input sequence is a "problem sequence"
(i.e., may be normalized into different strings by different
implementations).
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="pr29_4z ()">
<a name="pr29-4z"></a><h3>pr29_4z ()</h3>
<pre class="programlisting">int pr29_4z (const uint32_t *in);</pre>
<p>
Check the input to see if it may be normalized into different
strings by different NFKC implementations, due to an anomaly in the
NFKC specifications.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>in</code></em> :</span></p></td>
<td> zero terminated array of Unicode code points.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> Returns the <a class="link" href="libidn-pr29.html#Pr29-rc" title="enum Pr29_rc"><span class="type">Pr29_rc</span></a> value <a class="link" href="libidn-pr29.html#PR29-SUCCESS--CAPS"><code class="literal">PR29_SUCCESS</code></a> on success,
and <a class="link" href="libidn-pr29.html#PR29-PROBLEM--CAPS"><code class="literal">PR29_PROBLEM</code></a> if the input sequence is a "problem sequence"
(i.e., may be normalized into different strings by different
implementations).
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="pr29_8z ()">
<a name="pr29-8z"></a><h3>pr29_8z ()</h3>
<pre class="programlisting">int pr29_8z (const char *in);</pre>
<p>
Check the input to see if it may be normalized into different
strings by different NFKC implementations, due to an anomaly in the
NFKC specifications.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>in</code></em> :</span></p></td>
<td> zero terminated input UTF-8 string.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> Returns the <a class="link" href="libidn-pr29.html#Pr29-rc" title="enum Pr29_rc"><span class="type">Pr29_rc</span></a> value <a class="link" href="libidn-pr29.html#PR29-SUCCESS--CAPS"><code class="literal">PR29_SUCCESS</code></a> on success,
and <a class="link" href="libidn-pr29.html#PR29-PROBLEM--CAPS"><code class="literal">PR29_PROBLEM</code></a> if the input sequence is a "problem sequence"
(i.e., may be normalized into different strings by different
implementations), or <a class="link" href="libidn-pr29.html#PR29-STRINGPREP-ERROR--CAPS"><code class="literal">PR29_STRINGPREP_ERROR</code></a> if there was a
problem converting the string from UTF-8 to UCS-4.
</td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
<div class="footer">
<hr>
Generated by GTK-Doc V1.11</div>
</body>
</html>
|