<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>Xapian: API Documentation: xapian-core: Xapian::Unicode Namespace Reference</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> <link href="tabs.css" rel="stylesheet" type="text/css"> </head> <body bgcolor="#ffffff"> <!-- Generated by Doxygen 1.5.2 --> <div class="tabs"> <ul> <li><a href="index.html"><span>Main Page</span></a></li> <li class="current"><a href="namespaces.html"><span>Namespaces</span></a></li> <li><a href="classes.html"><span>Classes</span></a></li> <li><a href="files.html"><span>Files</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> </ul> </div> <div class="tabs"> <ul> <li><a href="namespaces.html"><span>Namespace List</span></a></li> <li><a href="namespacemembers.html"><span>Namespace Members</span></a></li> </ul> </div> <div class="nav"> <a class="el" href="namespaceXapian.html">Xapian</a>::<a class="el" href="namespaceXapian_1_1Unicode.html">Unicode</a></div> <h1>Xapian::Unicode Namespace Reference</h1>Functions associated with handling <a class="el" href="namespaceXapian_1_1Unicode.html" title="Functions associated with handling Unicode characters.">Unicode</a> characters. <a href="#_details">More...</a> <p> <table border="0" cellpadding="0" cellspacing="0"> <tr><td></td></tr> <tr><td colspan="2"><br><h2>Enumerations</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">enum </td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceXapian_1_1Unicode.html#da747a5a7a514391409b8982fe634703">category</a> { <br> <b>UNASSIGNED</b>, <b>UPPERCASE_LETTER</b>, <b>LOWERCASE_LETTER</b>, <b>TITLECASE_LETTER</b>, <br> <b>MODIFIER_LETTER</b>, <b>OTHER_LETTER</b>, <b>NON_SPACING_MARK</b>, <b>ENCLOSING_MARK</b>, <br> <b>COMBINING_SPACING_MARK</b>, <b>DECIMAL_DIGIT_NUMBER</b>, <b>LETTER_NUMBER</b>, <b>OTHER_NUMBER</b>, <br> <b>SPACE_SEPARATOR</b>, <b>LINE_SEPARATOR</b>, <b>PARAGRAPH_SEPARATOR</b>, <b>CONTROL</b>, <br> <b>FORMAT</b>, <b>PRIVATE_USE</b>, <b>SURROGATE</b>, <b>CONNECTOR_PUNCTUATION</b>, <br> <b>DASH_PUNCTUATION</b>, <b>OPEN_PUNCTUATION</b>, <b>CLOSE_PUNCTUATION</b>, <b>INITIAL_QUOTE_PUNCTUATION</b>, <br> <b>FINAL_QUOTE_PUNCTUATION</b>, <b>OTHER_PUNCTUATION</b>, <b>MATH_SYMBOL</b>, <b>CURRENCY_SYMBOL</b>, <br> <b>MODIFIER_SYMBOL</b>, <b>OTHER_SYMBOL</b> <br> }</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Each Unicode character is in exactly one of these categories. <a href="namespaceXapian_1_1Unicode.html#da747a5a7a514391409b8982fe634703">More...</a><br></td></tr> <tr><td colspan="2"><br><h2>Functions</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">unsigned </td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceXapian_1_1Unicode.html#f61a359a559c8ce809d3938ac6c5af06">nonascii_to_utf8</a> (unsigned ch, char *buf)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Convert a single non-ASCII <a class="el" href="namespaceXapian_1_1Unicode.html" title="Functions associated with handling Unicode characters.">Unicode</a> character to UTF-8. <a href="#f61a359a559c8ce809d3938ac6c5af06"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">unsigned </td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceXapian_1_1Unicode.html#3dcb2713d7086bad3252c8e9148af02b">to_utf8</a> (unsigned ch, char *buf)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Convert a single <a class="el" href="namespaceXapian_1_1Unicode.html" title="Functions associated with handling Unicode characters.">Unicode</a> character to UTF-8. <a href="#3dcb2713d7086bad3252c8e9148af02b"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceXapian_1_1Unicode.html#2afbd5350189f031de85302cdd7037cf">append_utf8</a> (std::string &s, unsigned ch)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Append the UTF-8 representation of a single <a class="el" href="namespaceXapian_1_1Unicode.html" title="Functions associated with handling Unicode characters.">Unicode</a> character to a std::string. <a href="#2afbd5350189f031de85302cdd7037cf"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="namespaceXapian_1_1Unicode.html#da747a5a7a514391409b8982fe634703">category</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceXapian_1_1Unicode.html#6bc3072fc94b883a33f514fee1d1e80f">get_category</a> (unsigned ch)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Return the category which a given <a class="el" href="namespaceXapian_1_1Unicode.html" title="Functions associated with handling Unicode characters.">Unicode</a> character falls into. <a href="#6bc3072fc94b883a33f514fee1d1e80f"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceXapian_1_1Unicode.html#2d750a2783da768811f6812c9a9271a7">is_wordchar</a> (unsigned ch)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Test if a given <a class="el" href="namespaceXapian_1_1Unicode.html" title="Functions associated with handling Unicode characters.">Unicode</a> character is "word character". <a href="#2d750a2783da768811f6812c9a9271a7"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceXapian_1_1Unicode.html#bb8b17adbc3462ed885ddda28283cca1">is_whitespace</a> (unsigned ch)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Test if a given <a class="el" href="namespaceXapian_1_1Unicode.html" title="Functions associated with handling Unicode characters.">Unicode</a> character is a whitespace character. <a href="#bb8b17adbc3462ed885ddda28283cca1"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceXapian_1_1Unicode.html#38353860d79fcb3d5732e983af6105ae">is_currency</a> (unsigned ch)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Test if a given <a class="el" href="namespaceXapian_1_1Unicode.html" title="Functions associated with handling Unicode characters.">Unicode</a> character is a currency symbol. <a href="#38353860d79fcb3d5732e983af6105ae"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">unsigned </td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceXapian_1_1Unicode.html#704bae20859bc0121bd8b0bd2d6159b9">tolower</a> (unsigned ch)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Convert a <a class="el" href="namespaceXapian_1_1Unicode.html" title="Functions associated with handling Unicode characters.">Unicode</a> character to lowercase. <a href="#704bae20859bc0121bd8b0bd2d6159b9"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">unsigned </td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceXapian_1_1Unicode.html#d5e9478d01094c8efd20c439d7495431">toupper</a> (unsigned ch)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Convert a <a class="el" href="namespaceXapian_1_1Unicode.html" title="Functions associated with handling Unicode characters.">Unicode</a> character to uppercase. <a href="#d5e9478d01094c8efd20c439d7495431"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">std::string </td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceXapian_1_1Unicode.html#7ea60af6150df950a59dcb7a362d4478">tolower</a> (const std::string &term)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Convert a UTF-8 std::string to lowercase. <a href="#7ea60af6150df950a59dcb7a362d4478"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">std::string </td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceXapian_1_1Unicode.html#a77704625c95d2b4efc51423ce8ba504">toupper</a> (const std::string &term)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Convert a UTF-8 std::string to uppercase. <a href="#a77704625c95d2b4efc51423ce8ba504"></a><br></td></tr> </table> <hr><a name="_details"></a><h2>Detailed Description</h2> Functions associated with handling <a class="el" href="namespaceXapian_1_1Unicode.html" title="Functions associated with handling Unicode characters.">Unicode</a> characters. <hr><h2>Enumeration Type Documentation</h2> <a class="anchor" name="da747a5a7a514391409b8982fe634703"></a><!-- doxytag: member="Xapian::Unicode::category" ref="da747a5a7a514391409b8982fe634703" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">enum <a class="el" href="namespaceXapian_1_1Unicode.html#da747a5a7a514391409b8982fe634703">Xapian::Unicode::category</a> </td> </tr> </table> </div> <div class="memdoc"> <p> Each <a class="el" href="namespaceXapian_1_1Unicode.html" title="Functions associated with handling Unicode characters.">Unicode</a> character is in exactly one of these categories. <p> </div> </div><p> <hr><h2>Function Documentation</h2> <a class="anchor" name="2afbd5350189f031de85302cdd7037cf"></a><!-- doxytag: member="Xapian::Unicode::append_utf8" ref="2afbd5350189f031de85302cdd7037cf" args="(std::string &s, unsigned ch)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void Xapian::Unicode::append_utf8 </td> <td>(</td> <td class="paramtype">std::string & </td> <td class="paramname"> <em>s</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">unsigned </td> <td class="paramname"> <em>ch</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td width="100%"><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Append the UTF-8 representation of a single <a class="el" href="namespaceXapian_1_1Unicode.html" title="Functions associated with handling Unicode characters.">Unicode</a> character to a std::string. <p> </div> </div><p> <a class="anchor" name="6bc3072fc94b883a33f514fee1d1e80f"></a><!-- doxytag: member="Xapian::Unicode::get_category" ref="6bc3072fc94b883a33f514fee1d1e80f" args="(unsigned ch)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="namespaceXapian_1_1Unicode.html#da747a5a7a514391409b8982fe634703">category</a> Xapian::Unicode::get_category </td> <td>(</td> <td class="paramtype">unsigned </td> <td class="paramname"> <em>ch</em> </td> <td> ) </td> <td width="100%"><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Return the category which a given <a class="el" href="namespaceXapian_1_1Unicode.html" title="Functions associated with handling Unicode characters.">Unicode</a> character falls into. <p> </div> </div><p> <a class="anchor" name="38353860d79fcb3d5732e983af6105ae"></a><!-- doxytag: member="Xapian::Unicode::is_currency" ref="38353860d79fcb3d5732e983af6105ae" args="(unsigned ch)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">bool Xapian::Unicode::is_currency </td> <td>(</td> <td class="paramtype">unsigned </td> <td class="paramname"> <em>ch</em> </td> <td> ) </td> <td width="100%"><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Test if a given <a class="el" href="namespaceXapian_1_1Unicode.html" title="Functions associated with handling Unicode characters.">Unicode</a> character is a currency symbol. <p> </div> </div><p> <a class="anchor" name="bb8b17adbc3462ed885ddda28283cca1"></a><!-- doxytag: member="Xapian::Unicode::is_whitespace" ref="bb8b17adbc3462ed885ddda28283cca1" args="(unsigned ch)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">bool Xapian::Unicode::is_whitespace </td> <td>(</td> <td class="paramtype">unsigned </td> <td class="paramname"> <em>ch</em> </td> <td> ) </td> <td width="100%"><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Test if a given <a class="el" href="namespaceXapian_1_1Unicode.html" title="Functions associated with handling Unicode characters.">Unicode</a> character is a whitespace character. <p> </div> </div><p> <a class="anchor" name="2d750a2783da768811f6812c9a9271a7"></a><!-- doxytag: member="Xapian::Unicode::is_wordchar" ref="2d750a2783da768811f6812c9a9271a7" args="(unsigned ch)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">bool Xapian::Unicode::is_wordchar </td> <td>(</td> <td class="paramtype">unsigned </td> <td class="paramname"> <em>ch</em> </td> <td> ) </td> <td width="100%"><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Test if a given <a class="el" href="namespaceXapian_1_1Unicode.html" title="Functions associated with handling Unicode characters.">Unicode</a> character is "word character". <p> </div> </div><p> <a class="anchor" name="f61a359a559c8ce809d3938ac6c5af06"></a><!-- doxytag: member="Xapian::Unicode::nonascii_to_utf8" ref="f61a359a559c8ce809d3938ac6c5af06" args="(unsigned ch, char *buf)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">unsigned Xapian::Unicode::nonascii_to_utf8 </td> <td>(</td> <td class="paramtype">unsigned </td> <td class="paramname"> <em>ch</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">char * </td> <td class="paramname"> <em>buf</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td width="100%"></td> </tr> </table> </div> <div class="memdoc"> <p> Convert a single non-ASCII <a class="el" href="namespaceXapian_1_1Unicode.html" title="Functions associated with handling Unicode characters.">Unicode</a> character to UTF-8. <p> This is intended mainly as a helper method for <a class="el" href="namespaceXapian_1_1Unicode.html#3dcb2713d7086bad3252c8e9148af02b" title="Convert a single Unicode character to UTF-8.">to_utf8()</a>.<p> The character <em>ch</em> (which must be > 128) is written to the buffer <em>buf</em> and the length of the resultant UTF-8 character is returned.<p> NB buf must have space for (at least) 4 bytes. </div> </div><p> <a class="anchor" name="3dcb2713d7086bad3252c8e9148af02b"></a><!-- doxytag: member="Xapian::Unicode::to_utf8" ref="3dcb2713d7086bad3252c8e9148af02b" args="(unsigned ch, char *buf)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">unsigned Xapian::Unicode::to_utf8 </td> <td>(</td> <td class="paramtype">unsigned </td> <td class="paramname"> <em>ch</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">char * </td> <td class="paramname"> <em>buf</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td width="100%"><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Convert a single <a class="el" href="namespaceXapian_1_1Unicode.html" title="Functions associated with handling Unicode characters.">Unicode</a> character to UTF-8. <p> The character <em>ch</em> is written to the buffer <em>buf</em> and the length of the resultant UTF-8 character is returned.<p> NB buf must have space for (at least) 4 bytes. </div> </div><p> <a class="anchor" name="7ea60af6150df950a59dcb7a362d4478"></a><!-- doxytag: member="Xapian::Unicode::tolower" ref="7ea60af6150df950a59dcb7a362d4478" args="(const std::string &term)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">std::string Xapian::Unicode::tolower </td> <td>(</td> <td class="paramtype">const std::string & </td> <td class="paramname"> <em>term</em> </td> <td> ) </td> <td width="100%"><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Convert a UTF-8 std::string to lowercase. <p> </div> </div><p> <a class="anchor" name="704bae20859bc0121bd8b0bd2d6159b9"></a><!-- doxytag: member="Xapian::Unicode::tolower" ref="704bae20859bc0121bd8b0bd2d6159b9" args="(unsigned ch)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">unsigned Xapian::Unicode::tolower </td> <td>(</td> <td class="paramtype">unsigned </td> <td class="paramname"> <em>ch</em> </td> <td> ) </td> <td width="100%"><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Convert a <a class="el" href="namespaceXapian_1_1Unicode.html" title="Functions associated with handling Unicode characters.">Unicode</a> character to lowercase. <p> </div> </div><p> <a class="anchor" name="a77704625c95d2b4efc51423ce8ba504"></a><!-- doxytag: member="Xapian::Unicode::toupper" ref="a77704625c95d2b4efc51423ce8ba504" args="(const std::string &term)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">std::string Xapian::Unicode::toupper </td> <td>(</td> <td class="paramtype">const std::string & </td> <td class="paramname"> <em>term</em> </td> <td> ) </td> <td width="100%"><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Convert a UTF-8 std::string to uppercase. <p> </div> </div><p> <a class="anchor" name="d5e9478d01094c8efd20c439d7495431"></a><!-- doxytag: member="Xapian::Unicode::toupper" ref="d5e9478d01094c8efd20c439d7495431" args="(unsigned ch)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">unsigned Xapian::Unicode::toupper </td> <td>(</td> <td class="paramtype">unsigned </td> <td class="paramname"> <em>ch</em> </td> <td> ) </td> <td width="100%"><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Convert a <a class="el" href="namespaceXapian_1_1Unicode.html" title="Functions associated with handling Unicode characters.">Unicode</a> character to uppercase. <p> </div> </div><p> <hr> <address><small> Documentation for Xapian (version 1.0.21).<br> Generated on 18 Jun 2010 by <a href="http://www.doxygen.org/">Doxygen 1.5.2</a>. </small></address> </body> </html>