/usr/share/gtk-doc/html/raptor/raptor-section-unicode.html is in libraptor1-doc 1.4.21-10.
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 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 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Unicode</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="index.html" title="Raptor RDF Syntax Parsing and Serializing Library Manual">
<link rel="up" href="reference-manual.html" title="Part II. Raptor Reference Manual">
<link rel="prev" href="raptor-section-triples.html" title="Triples">
<link rel="next" href="raptor-section-uri-factory.html" title="URI Factory">
<meta name="generator" content="GTK-Doc V1.13 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
<link rel="chapter" href="introduction.html" title="Raptor Overview">
<link rel="part" href="tutorial.html" title="Part I. Raptor Tutorial">
<link rel="chapter" href="tutorial-initialising-finishing.html" title="Initialising and Finishing using the Library">
<link rel="chapter" href="tutorial-querying-functionality.html" title="Listing built-in functionality">
<link rel="chapter" href="tutorial-parsing.html" title="Parsing syntaxes to RDF Triples">
<link rel="chapter" href="tutorial-serializing.html" title="Serializing RDF triples to a syntax">
<link rel="part" href="reference-manual.html" title="Part II. Raptor Reference Manual">
<link rel="chapter" href="raptor-parsers.html" title="Parsers in Raptor (syntax to triples)">
<link rel="chapter" href="raptor-serializers.html" title="Serializers in Raptor (triples to syntax)">
<link rel="index" href="ix01.html" title="Index">
</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="raptor-section-triples.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="reference-manual.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">Raptor RDF Syntax Parsing and Serializing Library Manual</th>
<td><a accesskey="n" href="raptor-section-uri-factory.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#raptor-section-unicode.synopsis" class="shortcut">Top</a>
|
<a href="#raptor-section-unicode.description" class="shortcut">Description</a>
</td></tr>
</table>
<div class="refentry" title="Unicode">
<a name="raptor-section-unicode"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="raptor-section-unicode.top_of_page"></a>Unicode</span></h2>
<p>Unicode — Unicode and UTF-8 utility functions.</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv" title="Synopsis">
<a name="raptor-section-unicode.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">typedef <a class="link" href="raptor-section-unicode.html#raptor-unichar" title="raptor_unichar">raptor_unichar</a>;
<span class="returnvalue">int</span> <a class="link" href="raptor-section-unicode.html#raptor-unicode-char-to-utf8" title="raptor_unicode_char_to_utf8 ()">raptor_unicode_char_to_utf8</a> (<a class="link" href="raptor-section-unicode.html#raptor-unichar" title="raptor_unichar"><span class="returnvalue">raptor_unichar</span></a> c,
unsigned <span class="returnvalue">char</span> *output);
<span class="returnvalue">int</span> <a class="link" href="raptor-section-unicode.html#raptor-utf8-to-unicode-char" title="raptor_utf8_to_unicode_char ()">raptor_utf8_to_unicode_char</a> (<a class="link" href="raptor-section-unicode.html#raptor-unichar" title="raptor_unichar"><span class="returnvalue">raptor_unichar</span></a> *output,
unsigned <span class="returnvalue">char</span> *input,
<span class="returnvalue">int</span> length);
<span class="returnvalue">int</span> <a class="link" href="raptor-section-unicode.html#raptor-unicode-is-xml11-namestartchar" title="raptor_unicode_is_xml11_namestartchar ()">raptor_unicode_is_xml11_namestartchar</a>
(<a class="link" href="raptor-section-unicode.html#raptor-unichar" title="raptor_unichar"><span class="returnvalue">raptor_unichar</span></a> c);
<span class="returnvalue">int</span> <a class="link" href="raptor-section-unicode.html#raptor-unicode-is-xml10-namestartchar" title="raptor_unicode_is_xml10_namestartchar ()">raptor_unicode_is_xml10_namestartchar</a>
(<a class="link" href="raptor-section-unicode.html#raptor-unichar" title="raptor_unichar"><span class="returnvalue">raptor_unichar</span></a> c);
<span class="returnvalue">int</span> <a class="link" href="raptor-section-unicode.html#raptor-unicode-is-xml11-namechar" title="raptor_unicode_is_xml11_namechar ()">raptor_unicode_is_xml11_namechar</a> (<a class="link" href="raptor-section-unicode.html#raptor-unichar" title="raptor_unichar"><span class="returnvalue">raptor_unichar</span></a> c);
<span class="returnvalue">int</span> <a class="link" href="raptor-section-unicode.html#raptor-unicode-is-xml10-namechar" title="raptor_unicode_is_xml10_namechar ()">raptor_unicode_is_xml10_namechar</a> (<a class="link" href="raptor-section-unicode.html#raptor-unichar" title="raptor_unichar"><span class="returnvalue">raptor_unichar</span></a> c);
<span class="returnvalue">int</span> <a class="link" href="raptor-section-unicode.html#raptor-utf8-check" title="raptor_utf8_check ()">raptor_utf8_check</a> (unsigned <span class="returnvalue">char</span> *string,
<span class="returnvalue">size_t</span> length);
</pre>
</div>
<div class="refsect1" title="Description">
<a name="raptor-section-unicode.description"></a><h2>Description</h2>
<p>
Functions to support converting to and from Unicode written in UTF-8
which is the native internal string format of all the redland libraries.
Includes checking for Unicode names using either the XML 1.0 or XML 1.1
rules.
</p>
</div>
<div class="refsect1" title="Details">
<a name="raptor-section-unicode.details"></a><h2>Details</h2>
<div class="refsect2" title="raptor_unichar">
<a name="raptor-unichar"></a><h3>raptor_unichar</h3>
<pre class="programlisting">typedef unsigned long raptor_unichar;
</pre>
<p>
raptor Unicode codepoint</p>
</div>
<hr>
<div class="refsect2" title="raptor_unicode_char_to_utf8 ()">
<a name="raptor-unicode-char-to-utf8"></a><h3>raptor_unicode_char_to_utf8 ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span> raptor_unicode_char_to_utf8 (<a class="link" href="raptor-section-unicode.html#raptor-unichar" title="raptor_unichar"><span class="returnvalue">raptor_unichar</span></a> c,
unsigned <span class="returnvalue">char</span> *output);</pre>
<p>
Convert a Unicode character to UTF-8 encoding.
</p>
<p>
Based on <a href="/usr/share/gtk-doc/html/redland/redland-unicode.html#librdf-unicode-char-to-utf8"><code class="function">librdf_unicode_char_to_utf8()</code></a> with no need to calculate
length since the encoded character is always copied into a buffer
with sufficient size.</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>c</code></em> :</span></p></td>
<td> Unicode character
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>output</code></em> :</span></p></td>
<td> UTF-8 string buffer or NULL
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> bytes encoded to output buffer or <0 on failure
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="raptor_utf8_to_unicode_char ()">
<a name="raptor-utf8-to-unicode-char"></a><h3>raptor_utf8_to_unicode_char ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span> raptor_utf8_to_unicode_char (<a class="link" href="raptor-section-unicode.html#raptor-unichar" title="raptor_unichar"><span class="returnvalue">raptor_unichar</span></a> *output,
unsigned <span class="returnvalue">char</span> *input,
<span class="returnvalue">int</span> length);</pre>
<p>
Convert an UTF-8 encoded buffer to a Unicode character.
</p>
<p>
If output is NULL, then will calculate the number of bytes that
will be used from the input buffer and not perform the conversion.</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>output</code></em> :</span></p></td>
<td> Pointer to the Unicode character or NULL
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>input</code></em> :</span></p></td>
<td> UTF-8 string buffer
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>length</code></em> :</span></p></td>
<td> buffer size
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> bytes used from input buffer or <0 on failure: -1 input buffer too short or length error, -2 overlong UTF-8 sequence, -3 illegal code positions, -4 code out of range U+0000 to U+10FFFF. In cases -2, -3 and -4 the coded character is stored in the output.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="raptor_unicode_is_xml11_namestartchar ()">
<a name="raptor-unicode-is-xml11-namestartchar"></a><h3>raptor_unicode_is_xml11_namestartchar ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span> raptor_unicode_is_xml11_namestartchar
(<a class="link" href="raptor-section-unicode.html#raptor-unichar" title="raptor_unichar"><span class="returnvalue">raptor_unichar</span></a> c);</pre>
<p>
Check if Unicode character is legal to start an XML 1.1 Name
</p>
<p>
Namespaces in XML 1.1 REC 2004-02-04
http://www.w3.org/TR/2004/REC-xml11-20040204/<span class="type">NT-NameStartChar</span>
updating
Extensible Markup Language (XML) 1.1 REC 2004-02-04
http://www.w3.org/TR/2004/REC-xml11-20040204/ sec 2.3, [4a]
excluding the ':'</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>c</code></em> :</span></p></td>
<td> Unicode character to check
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> non-0 if legal
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="raptor_unicode_is_xml10_namestartchar ()">
<a name="raptor-unicode-is-xml10-namestartchar"></a><h3>raptor_unicode_is_xml10_namestartchar ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span> raptor_unicode_is_xml10_namestartchar
(<a class="link" href="raptor-section-unicode.html#raptor-unichar" title="raptor_unichar"><span class="returnvalue">raptor_unichar</span></a> c);</pre>
<p>
Check if Unicode character is legal to start an XML 1.0 Name
</p>
<p>
Namespaces in XML REC 1999-01-14
http://www.w3.org/TR/1999/REC-xml-names-19990114/<span class="type">NT-NCName</span>
updating
Extensible Markup Language (XML) 1.0 (Third Edition) REC 2004-02-04
http://www.w3.org/TR/2004/REC-xml-20040204/
excluding the ':'</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>c</code></em> :</span></p></td>
<td> Unicode character to check
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> non-0 if legal
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="raptor_unicode_is_xml11_namechar ()">
<a name="raptor-unicode-is-xml11-namechar"></a><h3>raptor_unicode_is_xml11_namechar ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span> raptor_unicode_is_xml11_namechar (<a class="link" href="raptor-section-unicode.html#raptor-unichar" title="raptor_unichar"><span class="returnvalue">raptor_unichar</span></a> c);</pre>
<p>
Check if a Unicode codepoint is a legal to continue an XML 1.1 Name
</p>
<p>
Namespaces in XML 1.1 REC 2004-02-04
http://www.w3.org/TR/2004/REC-xml11-20040204/
updating
Extensible Markup Language (XML) 1.1 REC 2004-02-04
http://www.w3.org/TR/2004/REC-xml11-20040204/ sec 2.3, [4a]
excluding the ':'</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>c</code></em> :</span></p></td>
<td> Unicode character
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> non-0 if legal
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="raptor_unicode_is_xml10_namechar ()">
<a name="raptor-unicode-is-xml10-namechar"></a><h3>raptor_unicode_is_xml10_namechar ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span> raptor_unicode_is_xml10_namechar (<a class="link" href="raptor-section-unicode.html#raptor-unichar" title="raptor_unichar"><span class="returnvalue">raptor_unichar</span></a> c);</pre>
<p>
Check if a Unicode codepoint is a legal to continue an XML 1.0 Name
</p>
<p>
Namespaces in XML REC 1999-01-14
http://www.w3.org/TR/1999/REC-xml-names-19990114/<span class="type">NT-NCNameChar</span>
updating
Extensible Markup Language (XML) 1.0 (Third Edition) REC 2004-02-04
http://www.w3.org/TR/2004/REC-xml-20040204/
excluding the ':'</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>c</code></em> :</span></p></td>
<td> Unicode character
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> non-0 if legal
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="raptor_utf8_check ()">
<a name="raptor-utf8-check"></a><h3>raptor_utf8_check ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span> raptor_utf8_check (unsigned <span class="returnvalue">char</span> *string,
<span class="returnvalue">size_t</span> length);</pre>
<p>
Check a string is UTF-8.</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>string</code></em> :</span></p></td>
<td> UTF-8 string
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>length</code></em> :</span></p></td>
<td> length of string
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> Non 0 if the string is UTF-8
</td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
<div class="footer">
<hr>
Generated by GTK-Doc V1.13</div>
</body>
</html>
|