Sophie

Sophie

distrib > Mandriva > 2010.0 > x86_64 > by-pkgid > 7f3e5f74d754b480ec33648905c4afae > files > 499

glibmm2.4-doc-2.22.1-1mdv2010.0.x86_64.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>glibmm: Character Set Conversion</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.6.1 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="examples.html"><span>Examples</span></a></li>
    </ul>
  </div>
</div>
<div class="contents">
<h1>Character Set Conversion</h1>
<p>Utility functions for converting strings between different character sets. <a href="#_details">More...</a></p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Classes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">class&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classGlib_1_1ConvertError.html">Glib::ConvertError</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="classGlib_1_1Exception.html">Exception</a> class for charset conversion errors. <a href="classGlib_1_1ConvertError.html#_details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">class&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classGlib_1_1IConv.html">Glib::IConv</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Thin iconv() wrapper. <a href="classGlib_1_1IConv.html#_details">More...</a><br/></td></tr>
<tr><td colspan="2"><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CharsetConv.html#gabf5fac564c47a7a9ad6037044c3909f4">Glib::get_charset</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the charset used by the current locale. <a href="#gabf5fac564c47a7a9ad6037044c3909f4"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CharsetConv.html#ga88965337df48a173a6b013e8243e4631">Glib::get_charset</a> (<a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00971.html#a32db3d9898c44d3b3a578b560f7758cc">std::string</a>&amp; charset)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the charset used by the current locale. <a href="#ga88965337df48a173a6b013e8243e4631"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00971.html#a32db3d9898c44d3b3a578b560f7758cc">std::string</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CharsetConv.html#ga58f7e4556c436a96c64b186bbc8f7f4c">Glib::convert</a> (const <a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00971.html#a32db3d9898c44d3b3a578b560f7758cc">std::string</a>&amp; str, const <a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00971.html#a32db3d9898c44d3b3a578b560f7758cc">std::string</a>&amp; to_codeset, const <a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00971.html#a32db3d9898c44d3b3a578b560f7758cc">std::string</a>&amp; from_codeset)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Convert from one encoding to another. <a href="#ga58f7e4556c436a96c64b186bbc8f7f4c"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00971.html#a32db3d9898c44d3b3a578b560f7758cc">std::string</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CharsetConv.html#ga40b5aa172fabd1f3dbf50a962d0d351f">Glib::convert_with_fallback</a> (const <a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00971.html#a32db3d9898c44d3b3a578b560f7758cc">std::string</a>&amp; str, const <a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00971.html#a32db3d9898c44d3b3a578b560f7758cc">std::string</a>&amp; to_codeset, const <a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00971.html#a32db3d9898c44d3b3a578b560f7758cc">std::string</a>&amp; from_codeset)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Converts a string from one character set to another, possibly including fallback sequences for characters not representable in the output. <a href="#ga40b5aa172fabd1f3dbf50a962d0d351f"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00971.html#a32db3d9898c44d3b3a578b560f7758cc">std::string</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CharsetConv.html#gaf1b091e4397a7637e884148484b1f71e">Glib::convert_with_fallback</a> (const <a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00971.html#a32db3d9898c44d3b3a578b560f7758cc">std::string</a>&amp; str, const <a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00971.html#a32db3d9898c44d3b3a578b560f7758cc">std::string</a>&amp; to_codeset, const <a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00971.html#a32db3d9898c44d3b3a578b560f7758cc">std::string</a>&amp; from_codeset, const <a class="el" href="classGlib_1_1ustring.html">Glib::ustring</a>&amp; fallback)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Converts a string from one character set to another, possibly including fallback sequences for characters not representable in the output. <a href="#gaf1b091e4397a7637e884148484b1f71e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classGlib_1_1ustring.html">Glib::ustring</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CharsetConv.html#ga4517b17f2aad4cd5c0e0640de212d928">Glib::locale_to_utf8</a> (const <a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00971.html#a32db3d9898c44d3b3a578b560f7758cc">std::string</a>&amp; opsys_string)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Convert from the current locale's encoding to UTF-8. <a href="#ga4517b17f2aad4cd5c0e0640de212d928"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00971.html#a32db3d9898c44d3b3a578b560f7758cc">std::string</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CharsetConv.html#gacc062729285890a7e9b22bece6fb987c">Glib::locale_from_utf8</a> (const <a class="el" href="classGlib_1_1ustring.html">Glib::ustring</a>&amp; utf8_string)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Convert from UTF-8 to the current locale's encoding. <a href="#gacc062729285890a7e9b22bece6fb987c"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classGlib_1_1ustring.html">Glib::ustring</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CharsetConv.html#ga6cf95dc00505401594260a360d70c17b">Glib::filename_to_utf8</a> (const <a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00971.html#a32db3d9898c44d3b3a578b560f7758cc">std::string</a>&amp; opsys_string)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Converts a string which is in the encoding used for filenames into a UTF-8 string. <a href="#ga6cf95dc00505401594260a360d70c17b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00971.html#a32db3d9898c44d3b3a578b560f7758cc">std::string</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CharsetConv.html#ga2bd94064ad97b43324a7854b62f0835b">Glib::filename_from_utf8</a> (const <a class="el" href="classGlib_1_1ustring.html">Glib::ustring</a>&amp; utf8_string)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Converts a string from UTF-8 to the encoding used for filenames. <a href="#ga2bd94064ad97b43324a7854b62f0835b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00971.html#a32db3d9898c44d3b3a578b560f7758cc">std::string</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CharsetConv.html#gada23cd7f7dc8eb25e99b867a55551763">Glib::filename_from_uri</a> (const <a class="el" href="classGlib_1_1ustring.html">Glib::ustring</a>&amp; uri, <a class="el" href="classGlib_1_1ustring.html">Glib::ustring</a>&amp; hostname)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Converts an escaped UTF-8 encoded URI to a local filename in the encoding used for filenames. <a href="#gada23cd7f7dc8eb25e99b867a55551763"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00971.html#a32db3d9898c44d3b3a578b560f7758cc">std::string</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CharsetConv.html#gab1cb94f4a4a70bad06b715fb14a252d9">Glib::filename_from_uri</a> (const <a class="el" href="classGlib_1_1ustring.html">Glib::ustring</a>&amp; uri)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Converts an escaped UTF-8 encoded URI to a local filename in the encoding used for filenames. <a href="#gab1cb94f4a4a70bad06b715fb14a252d9"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classGlib_1_1ustring.html">Glib::ustring</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CharsetConv.html#gae1b2f056bde3fbab578c602fe42e3de9">Glib::filename_to_uri</a> (const <a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00971.html#a32db3d9898c44d3b3a578b560f7758cc">std::string</a>&amp; filename, const <a class="el" href="classGlib_1_1ustring.html">Glib::ustring</a>&amp; hostname)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Converts an absolute filename to an escaped UTF-8 encoded URI. <a href="#gae1b2f056bde3fbab578c602fe42e3de9"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classGlib_1_1ustring.html">Glib::ustring</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CharsetConv.html#gaaf69aec83665229cc06596cf627d9d5a">Glib::filename_to_uri</a> (const <a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00971.html#a32db3d9898c44d3b3a578b560f7758cc">std::string</a>&amp; filename)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Converts an absolute filename to an escaped UTF-8 encoded URI. <a href="#gaaf69aec83665229cc06596cf627d9d5a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classGlib_1_1ustring.html">Glib::ustring</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CharsetConv.html#ga05dd67157ad35da4401263247b6f4d81">Glib::filename_display_basename</a> (const <a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00971.html#a32db3d9898c44d3b3a578b560f7758cc">std::string</a>&amp; filename)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the display basename for the particular filename, guaranteed to be valid UTF-8. <a href="#ga05dd67157ad35da4401263247b6f4d81"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classGlib_1_1ustring.html">Glib::ustring</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CharsetConv.html#gabc1b404cc965f3da6beecddfe2623afc">Glib::filename_display_name</a> (const <a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00971.html#a32db3d9898c44d3b3a578b560f7758cc">std::string</a>&amp; filename)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Converts a filename into a valid UTF-8 string. <a href="#gabc1b404cc965f3da6beecddfe2623afc"></a><br/></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>Utility functions for converting strings between different character sets. </p>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="ga58f7e4556c436a96c64b186bbc8f7f4c"></a><!-- doxytag: member="Glib::convert" ref="ga58f7e4556c436a96c64b186bbc8f7f4c" args="(const std::string &amp;str, const std::string &amp;to_codeset, const std::string &amp;from_codeset)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00971.html#a32db3d9898c44d3b3a578b560f7758cc">std::string</a> Glib::convert </td>
          <td>(</td>
          <td class="paramtype">const <a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00971.html#a32db3d9898c44d3b3a578b560f7758cc">std::string</a> &amp;&#160;</td>
          <td class="paramname"> <em>str</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00971.html#a32db3d9898c44d3b3a578b560f7758cc">std::string</a> &amp;&#160;</td>
          <td class="paramname"> <em>to_codeset</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00971.html#a32db3d9898c44d3b3a578b560f7758cc">std::string</a> &amp;&#160;</td>
          <td class="paramname"> <em>from_codeset</em></td><td>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Convert from one encoding to another. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>str</em>&#160;</td><td>The string to convert. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>to_codeset</em>&#160;</td><td>Name of the target charset. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>from_codeset</em>&#160;</td><td>Name of the source charset. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The converted string. </dd></dl>
<dl><dt><b>Exceptions:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classGlib_1_1ConvertError.html" title="Exception class for charset conversion errors.">Glib::ConvertError</a></em>&#160;</td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="gaf1b091e4397a7637e884148484b1f71e"></a><!-- doxytag: member="Glib::convert_with_fallback" ref="gaf1b091e4397a7637e884148484b1f71e" args="(const std::string &amp;str, const std::string &amp;to_codeset, const std::string &amp;from_codeset, const Glib::ustring &amp;fallback)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00971.html#a32db3d9898c44d3b3a578b560f7758cc">std::string</a> Glib::convert_with_fallback </td>
          <td>(</td>
          <td class="paramtype">const <a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00971.html#a32db3d9898c44d3b3a578b560f7758cc">std::string</a> &amp;&#160;</td>
          <td class="paramname"> <em>str</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00971.html#a32db3d9898c44d3b3a578b560f7758cc">std::string</a> &amp;&#160;</td>
          <td class="paramname"> <em>to_codeset</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00971.html#a32db3d9898c44d3b3a578b560f7758cc">std::string</a> &amp;&#160;</td>
          <td class="paramname"> <em>from_codeset</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classGlib_1_1ustring.html">Glib::ustring</a>&amp;&#160;</td>
          <td class="paramname"> <em>fallback</em></td><td>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Converts a string from one character set to another, possibly including fallback sequences for characters not representable in the output. </p>
<dl class="note"><dt><b>Note:</b></dt><dd>It is not guaranteed that the specification for the fallback sequences in <em>fallback</em> will be honored. Some systems may do a approximate conversion from <em>from_codeset</em> to <em>to_codeset</em> in their iconv() functions, in which case <a class="el" href="namespaceGlib.html">Glib</a> will simply return that approximate conversion.</dd></dl>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>str</em>&#160;</td><td>The string to convert. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>to_codeset</em>&#160;</td><td>Name of the target charset. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>from_codeset</em>&#160;</td><td>Name of the source charset. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>fallback</em>&#160;</td><td>UTF-8 string to be used in place of characters which aren't available in the target encoding. All characters in the fallback string <em>must</em> be available in the target encoding. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The converted string. </dd></dl>
<dl><dt><b>Exceptions:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classGlib_1_1ConvertError.html" title="Exception class for charset conversion errors.">Glib::ConvertError</a></em>&#160;</td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga40b5aa172fabd1f3dbf50a962d0d351f"></a><!-- doxytag: member="Glib::convert_with_fallback" ref="ga40b5aa172fabd1f3dbf50a962d0d351f" args="(const std::string &amp;str, const std::string &amp;to_codeset, const std::string &amp;from_codeset)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00971.html#a32db3d9898c44d3b3a578b560f7758cc">std::string</a> Glib::convert_with_fallback </td>
          <td>(</td>
          <td class="paramtype">const <a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00971.html#a32db3d9898c44d3b3a578b560f7758cc">std::string</a> &amp;&#160;</td>
          <td class="paramname"> <em>str</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00971.html#a32db3d9898c44d3b3a578b560f7758cc">std::string</a> &amp;&#160;</td>
          <td class="paramname"> <em>to_codeset</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00971.html#a32db3d9898c44d3b3a578b560f7758cc">std::string</a> &amp;&#160;</td>
          <td class="paramname"> <em>from_codeset</em></td><td>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Converts a string from one character set to another, possibly including fallback sequences for characters not representable in the output. </p>
<p>Characters not in the target encoding will be represented as <a class="el" href="namespaceGlib_1_1Unicode.html">Unicode</a> escapes <code>\x{XXXX}</code> or <code>\x{XXXXXX}</code>. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>str</em>&#160;</td><td>The string to convert. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>to_codeset</em>&#160;</td><td>Name of the target charset. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>from_codeset</em>&#160;</td><td>Name of the source charset. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The converted string. </dd></dl>
<dl><dt><b>Exceptions:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classGlib_1_1ConvertError.html" title="Exception class for charset conversion errors.">Glib::ConvertError</a></em>&#160;</td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga05dd67157ad35da4401263247b6f4d81"></a><!-- doxytag: member="Glib::filename_display_basename" ref="ga05dd67157ad35da4401263247b6f4d81" args="(const std::string &amp;filename)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classGlib_1_1ustring.html">Glib::ustring</a> Glib::filename_display_basename </td>
          <td>(</td>
          <td class="paramtype">const <a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00971.html#a32db3d9898c44d3b3a578b560f7758cc">std::string</a> &amp;&#160;</td>
          <td class="paramname"> <em>filename</em></td>
          <td>&#160;)&#160;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns the display basename for the particular filename, guaranteed to be valid UTF-8. </p>
<p>The display name might not be identical to the filename, for instance there might be problems converting it to UTF-8, and some files can be translated in the display</p>
<p>You must pass the whole absolute pathname to this function so that translation of well known locations can be done.</p>
<p>This function is preferred over <a class="el" href="group__CharsetConv.html#gabc1b404cc965f3da6beecddfe2623afc" title="Converts a filename into a valid UTF-8 string.">filename_display_name()</a> if you know the whole path, as it allows translation.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>filename</em>&#160;</td><td>An absolute pathname in the GLib file name encoding. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>A string containing a rendition of the basename of the filename in valid UTF-8 </dd></dl>

</div>
</div>
<a class="anchor" id="gabc1b404cc965f3da6beecddfe2623afc"></a><!-- doxytag: member="Glib::filename_display_name" ref="gabc1b404cc965f3da6beecddfe2623afc" args="(const std::string &amp;filename)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classGlib_1_1ustring.html">Glib::ustring</a> Glib::filename_display_name </td>
          <td>(</td>
          <td class="paramtype">const <a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00971.html#a32db3d9898c44d3b3a578b560f7758cc">std::string</a> &amp;&#160;</td>
          <td class="paramname"> <em>filename</em></td>
          <td>&#160;)&#160;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Converts a filename into a valid UTF-8 string. </p>
<p>The conversion is not necessarily reversible, so you should keep the original around and use the return value of this function only for display purposes. Unlike g_filename_to_utf8(), the result is guaranteed to be non-empty even if the filename actually isn't in the GLib file name encoding.</p>
<p>If you know the whole pathname of the file you should use g_filename_display_basename(), since that allows location-based translation of filenames.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>filename,:</em>&#160;</td><td>a pathname hopefully in the GLib file name encoding </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>A string containing a rendition of the filename in valid UTF-8. </dd></dl>

</div>
</div>
<a class="anchor" id="gab1cb94f4a4a70bad06b715fb14a252d9"></a><!-- doxytag: member="Glib::filename_from_uri" ref="gab1cb94f4a4a70bad06b715fb14a252d9" args="(const Glib::ustring &amp;uri)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00971.html#a32db3d9898c44d3b3a578b560f7758cc">std::string</a> Glib::filename_from_uri </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classGlib_1_1ustring.html">Glib::ustring</a>&amp;&#160;</td>
          <td class="paramname"> <em>uri</em></td>
          <td>&#160;)&#160;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Converts an escaped UTF-8 encoded URI to a local filename in the encoding used for filenames. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>uri</em>&#160;</td><td>A string in the encoding for filenames. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The resulting filename. </dd></dl>
<dl><dt><b>Exceptions:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classGlib_1_1ConvertError.html" title="Exception class for charset conversion errors.">Glib::ConvertError</a></em>&#160;</td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="gada23cd7f7dc8eb25e99b867a55551763"></a><!-- doxytag: member="Glib::filename_from_uri" ref="gada23cd7f7dc8eb25e99b867a55551763" args="(const Glib::ustring &amp;uri, Glib::ustring &amp;hostname)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00971.html#a32db3d9898c44d3b3a578b560f7758cc">std::string</a> Glib::filename_from_uri </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classGlib_1_1ustring.html">Glib::ustring</a>&amp;&#160;</td>
          <td class="paramname"> <em>uri</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classGlib_1_1ustring.html">Glib::ustring</a>&amp;&#160;</td>
          <td class="paramname"> <em>hostname</em></td><td>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Converts an escaped UTF-8 encoded URI to a local filename in the encoding used for filenames. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>uri</em>&#160;</td><td>A string in the encoding for filenames. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>hostname</em>&#160;</td><td>Location to store hostname for the URI. If there is no hostname in the URI, <code>""</code> will be stored in this location. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The resulting filename. </dd></dl>
<dl><dt><b>Exceptions:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classGlib_1_1ConvertError.html" title="Exception class for charset conversion errors.">Glib::ConvertError</a></em>&#160;</td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga2bd94064ad97b43324a7854b62f0835b"></a><!-- doxytag: member="Glib::filename_from_utf8" ref="ga2bd94064ad97b43324a7854b62f0835b" args="(const Glib::ustring &amp;utf8_string)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00971.html#a32db3d9898c44d3b3a578b560f7758cc">std::string</a> Glib::filename_from_utf8 </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classGlib_1_1ustring.html">Glib::ustring</a>&amp;&#160;</td>
          <td class="paramname"> <em>utf8_string</em></td>
          <td>&#160;)&#160;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Converts a string from UTF-8 to the encoding used for filenames. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>utf8_string</em>&#160;</td><td>A UTF-8 encoded string. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The converted string. </dd></dl>
<dl><dt><b>Exceptions:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classGlib_1_1ConvertError.html" title="Exception class for charset conversion errors.">Glib::ConvertError</a></em>&#160;</td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="gaaf69aec83665229cc06596cf627d9d5a"></a><!-- doxytag: member="Glib::filename_to_uri" ref="gaaf69aec83665229cc06596cf627d9d5a" args="(const std::string &amp;filename)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classGlib_1_1ustring.html">Glib::ustring</a> Glib::filename_to_uri </td>
          <td>(</td>
          <td class="paramtype">const <a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00971.html#a32db3d9898c44d3b3a578b560f7758cc">std::string</a> &amp;&#160;</td>
          <td class="paramname"> <em>filename</em></td>
          <td>&#160;)&#160;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Converts an absolute filename to an escaped UTF-8 encoded URI. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>filename</em>&#160;</td><td>An absolute filename specified in the encoding used for filenames by the operating system. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The resulting URI. </dd></dl>
<dl><dt><b>Exceptions:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classGlib_1_1ConvertError.html" title="Exception class for charset conversion errors.">Glib::ConvertError</a></em>&#160;</td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="gae1b2f056bde3fbab578c602fe42e3de9"></a><!-- doxytag: member="Glib::filename_to_uri" ref="gae1b2f056bde3fbab578c602fe42e3de9" args="(const std::string &amp;filename, const Glib::ustring &amp;hostname)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classGlib_1_1ustring.html">Glib::ustring</a> Glib::filename_to_uri </td>
          <td>(</td>
          <td class="paramtype">const <a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00971.html#a32db3d9898c44d3b3a578b560f7758cc">std::string</a> &amp;&#160;</td>
          <td class="paramname"> <em>filename</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classGlib_1_1ustring.html">Glib::ustring</a>&amp;&#160;</td>
          <td class="paramname"> <em>hostname</em></td><td>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Converts an absolute filename to an escaped UTF-8 encoded URI. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>filename</em>&#160;</td><td>An absolute filename specified in the encoding used for filenames by the operating system. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>hostname</em>&#160;</td><td>A UTF-8 encoded hostname. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The resulting URI. </dd></dl>
<dl><dt><b>Exceptions:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classGlib_1_1ConvertError.html" title="Exception class for charset conversion errors.">Glib::ConvertError</a></em>&#160;</td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga6cf95dc00505401594260a360d70c17b"></a><!-- doxytag: member="Glib::filename_to_utf8" ref="ga6cf95dc00505401594260a360d70c17b" args="(const std::string &amp;opsys_string)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classGlib_1_1ustring.html">Glib::ustring</a> Glib::filename_to_utf8 </td>
          <td>(</td>
          <td class="paramtype">const <a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00971.html#a32db3d9898c44d3b3a578b560f7758cc">std::string</a> &amp;&#160;</td>
          <td class="paramname"> <em>opsys_string</em></td>
          <td>&#160;)&#160;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Converts a string which is in the encoding used for filenames into a UTF-8 string. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>opsys_string</em>&#160;</td><td>A string in the encoding for filenames. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The converted string. </dd></dl>
<dl><dt><b>Exceptions:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classGlib_1_1ConvertError.html" title="Exception class for charset conversion errors.">Glib::ConvertError</a></em>&#160;</td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga88965337df48a173a6b013e8243e4631"></a><!-- doxytag: member="Glib::get_charset" ref="ga88965337df48a173a6b013e8243e4631" args="(std::string &amp;charset)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool Glib::get_charset </td>
          <td>(</td>
          <td class="paramtype"><a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00971.html#a32db3d9898c44d3b3a578b560f7758cc">std::string</a> &amp;&#160;</td>
          <td class="paramname"> <em>charset</em></td>
          <td>&#160;)&#160;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get the charset used by the current locale. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>charset</em>&#160;</td><td>Will be filled with the charset's name. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Whether the current locale uses the UTF-8 charset. </dd></dl>

</div>
</div>
<a class="anchor" id="gabf5fac564c47a7a9ad6037044c3909f4"></a><!-- doxytag: member="Glib::get_charset" ref="gabf5fac564c47a7a9ad6037044c3909f4" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool Glib::get_charset </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&#160;)&#160;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get the charset used by the current locale. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>Whether the current locale uses the UTF-8 charset. </dd></dl>

</div>
</div>
<a class="anchor" id="gacc062729285890a7e9b22bece6fb987c"></a><!-- doxytag: member="Glib::locale_from_utf8" ref="gacc062729285890a7e9b22bece6fb987c" args="(const Glib::ustring &amp;utf8_string)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00971.html#a32db3d9898c44d3b3a578b560f7758cc">std::string</a> Glib::locale_from_utf8 </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classGlib_1_1ustring.html">Glib::ustring</a>&amp;&#160;</td>
          <td class="paramname"> <em>utf8_string</em></td>
          <td>&#160;)&#160;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Convert from UTF-8 to the current locale's encoding. </p>
<p>Convenience wrapper around <a class="el" href="group__CharsetConv.html#ga58f7e4556c436a96c64b186bbc8f7f4c" title="Convert from one encoding to another.">Glib::convert()</a>. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>utf8_string</em>&#160;</td><td>The UTF-8 string to convert. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The input string converted to the charset used by the operating system's current locale. </dd></dl>
<dl><dt><b>Exceptions:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classGlib_1_1ConvertError.html" title="Exception class for charset conversion errors.">Glib::ConvertError</a></em>&#160;</td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga4517b17f2aad4cd5c0e0640de212d928"></a><!-- doxytag: member="Glib::locale_to_utf8" ref="ga4517b17f2aad4cd5c0e0640de212d928" args="(const std::string &amp;opsys_string)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classGlib_1_1ustring.html">Glib::ustring</a> Glib::locale_to_utf8 </td>
          <td>(</td>
          <td class="paramtype">const <a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00971.html#a32db3d9898c44d3b3a578b560f7758cc">std::string</a> &amp;&#160;</td>
          <td class="paramname"> <em>opsys_string</em></td>
          <td>&#160;)&#160;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Convert from the current locale's encoding to UTF-8. </p>
<p>Convenience wrapper around <a class="el" href="group__CharsetConv.html#ga58f7e4556c436a96c64b186bbc8f7f4c" title="Convert from one encoding to another.">Glib::convert()</a>. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>opsys_string</em>&#160;</td><td>The string to convert. Must be encoded in the charset used by the operating system's current locale. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The input string converted to UTF-8 encoding. </dd></dl>
<dl><dt><b>Exceptions:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classGlib_1_1ConvertError.html" title="Exception class for charset conversion errors.">Glib::ConvertError</a></em>&#160;</td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
</div>
<hr size="1"/><address style="text-align: right;"><small>Generated on Mon Sep 21 11:07:19 2009 for glibmm by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
</html>