<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> <title>pr29</title> <meta name="generator" content="DocBook XSL Stylesheets V1.68.1"> <link rel="start" 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.4 (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" 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></table> <div class="refentry" lang="en"> <a name="libidn-pr29"></a><div class="titlepage"></div> <div class="refnamediv"><table width="100%"><tr> <td valign="top"> <h2><span class="refentrytitle">pr29</span></h2> <p>pr29 — </p> </td> <td valign="top" align="right"></td> </tr></table></div> <div class="refsynopsisdiv"> <h2>Synopsis</h2> <pre class="synopsis"> enum <a href="libidn-pr29.html#Pr29-rc">Pr29_rc</a>; const char* <a href="libidn-pr29.html#pr29-strerror">pr29_strerror</a> (<a href="libidn-pr29.html#Pr29-rc">Pr29_rc</a> rc); int <a href="libidn-pr29.html#pr29-4">pr29_4</a> (const uint32_t *in, size_t len); int <a href="libidn-pr29.html#pr29-4z">pr29_4z</a> (const uint32_t *in); int <a href="libidn-pr29.html#pr29-8z">pr29_8z</a> (const char *in); </pre> </div> <div class="refsect1" lang="en"> <a name="id2550051"></a><h2>Description</h2> <p> </p> </div> <div class="refsect1" lang="en"> <a name="id2550062"></a><h2>Details</h2> <div class="refsect2" lang="en"> <a name="id2550068"></a><h3> <a name="Pr29-rc"></a>enum Pr29_rc</h3> <a class="indexterm" name="id2550078"></a><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 href="libidn-pr29.html#pr29-4"><code class="function">pr29_4()</code></a>, <a href="libidn-pr29.html#pr29-4z"><code class="function">pr29_4z()</code></a>, <a href="libidn-pr29.html#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> <span class="term"><code class="literal">PR29_SUCCESS</code></span></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> <span class="term"><code class="literal">PR29_PROBLEM</code></span></td> <td> A problem sequence was encountered. </td> </tr> <tr> <td> <span class="term"><code class="literal">PR29_STRINGPREP_ERROR</code></span></td> <td> The character set conversion failed (only for <code class="function">pr29_8()</code> and <a href="libidn-pr29.html#pr29-8z"><code class="function">pr29_8z()</code></a>). </td> </tr> </tbody> </table></div> </div> <hr> <div class="refsect2" lang="en"> <a name="id2530574"></a><h3> <a name="pr29-strerror"></a>pr29_strerror ()</h3> <a class="indexterm" name="id2530584"></a><pre class="programlisting">const char* pr29_strerror (<a href="libidn-pr29.html#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 href="libidn-pr29.html#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> <span class="term"><em class="parameter"><code>rc</code></em> :</span></td> <td> an <a href="libidn-pr29.html#Pr29-rc"><span class="type">Pr29_rc</span></a> return code. </td> </tr> <tr> <td> <span class="term"><span class="emphasis"><em>Returns</em></span> :</span></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" lang="en"> <a name="id2526392"></a><h3> <a name="pr29-4"></a>pr29_4 ()</h3> <a class="indexterm" name="id2526402"></a><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> <span class="term"><em class="parameter"><code>in</code></em> :</span></td> <td> input array with unicode code points. </td> </tr> <tr> <td> <span class="term"><em class="parameter"><code>len</code></em> :</span></td> <td> length of input array with unicode code points. </td> </tr> <tr> <td> <span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td> <td> Returns the <a href="libidn-pr29.html#Pr29-rc"><span class="type">Pr29_rc</span></a> value <code class="literal">PR29_SUCCESS</code> on success, and <code class="literal">PR29_PROBLEM</code> 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" lang="en"> <a name="id2526507"></a><h3> <a name="pr29-4z"></a>pr29_4z ()</h3> <a class="indexterm" name="id2526517"></a><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> <span class="term"><em class="parameter"><code>in</code></em> :</span></td> <td> zero terminated array of Unicode code points. </td> </tr> <tr> <td> <span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td> <td> Returns the <a href="libidn-pr29.html#Pr29-rc"><span class="type">Pr29_rc</span></a> value <code class="literal">PR29_SUCCESS</code> on success, and <code class="literal">PR29_PROBLEM</code> 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" lang="en"> <a name="id2547272"></a><h3> <a name="pr29-8z"></a>pr29_8z ()</h3> <a class="indexterm" name="id2547282"></a><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> <span class="term"><em class="parameter"><code>in</code></em> :</span></td> <td> zero terminated input UTF-8 string. </td> </tr> <tr> <td> <span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td> <td> Returns the <a href="libidn-pr29.html#Pr29-rc"><span class="type">Pr29_rc</span></a> value <code class="literal">PR29_SUCCESS</code> on success, and <code class="literal">PR29_PROBLEM</code> if the input sequence is a "problem sequence" (i.e., may be normalized into different strings by different implementations), or <code class="literal">PR29_STRINGPREP_ERROR</code> if there was a problem converting the string from UTF-8 to UCS-4. </td> </tr> </tbody> </table></div> </div> </div> </div> <table class="navigation" width="100%" summary="Navigation footer" cellpadding="2" cellspacing="0"><tr valign="middle"> <td align="left"><a accesskey="p" href="libidn-idna.html"><b><< idna</b></a></td> <td align="right"><a accesskey="n" href="libidn-punycode.html"><b>punycode >></b></a></td> </tr></table> </body> </html>