4
4
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5
5
<title>GCharsetConverter</title>
6
<meta name="generator" content="DocBook XSL Stylesheets V1.78.0">
6
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
7
7
<link rel="home" href="index.html" title="GIO Reference Manual">
8
8
<link rel="up" href="conversion.html" title="Data conversion">
9
9
<link rel="prev" href="GConverter.html" title="GConverter">
10
10
<link rel="next" href="GZlibCompressor.html" title="GZlibCompressor">
11
<meta name="generator" content="GTK-Doc V1.18 (XML mode)">
11
<meta name="generator" content="GTK-Doc V1.18.1 (XML mode)">
12
12
<link rel="stylesheet" href="style.css" type="text/css">
14
14
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
47
47
#include <gio/gio.h>
49
49
<a class="link" href="GCharsetConverter.html#GCharsetConverter-struct" title="GCharsetConverter">GCharsetConverter</a>;
50
<a class="link" href="GCharsetConverter.html" title="GCharsetConverter"><span class="returnvalue">GCharsetConverter</span></a> * <a class="link" href="GCharsetConverter.html#g-charset-converter-new" title="g_charset_converter_new ()">g_charset_converter_new</a> (<em class="parameter"><code>const <a href="./../glib/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *to_charset</code></em>,
51
<em class="parameter"><code>const <a href="./../glib/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *from_charset</code></em>,
52
<em class="parameter"><code><a href="./../glib/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
50
<a class="link" href="GCharsetConverter.html" title="GCharsetConverter"><span class="returnvalue">GCharsetConverter</span></a> * <a class="link" href="GCharsetConverter.html#g-charset-converter-new" title="g_charset_converter_new ()">g_charset_converter_new</a> (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *to_charset</code></em>,
51
<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *from_charset</code></em>,
52
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
53
53
<span class="returnvalue">void</span> <a class="link" href="GCharsetConverter.html#g-charset-converter-set-use-fallback" title="g_charset_converter_set_use_fallback ()">g_charset_converter_set_use_fallback</a>
54
54
(<em class="parameter"><code><a class="link" href="GCharsetConverter.html" title="GCharsetConverter"><span class="type">GCharsetConverter</span></a> *converter</code></em>,
55
<em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> use_fallback</code></em>);
56
<a href="./../glib/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="GCharsetConverter.html#g-charset-converter-get-use-fallback" title="g_charset_converter_get_use_fallback ()">g_charset_converter_get_use_fallback</a>
55
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> use_fallback</code></em>);
56
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="GCharsetConverter.html#g-charset-converter-get-use-fallback" title="g_charset_converter_get_use_fallback ()">g_charset_converter_get_use_fallback</a>
57
57
(<em class="parameter"><code><a class="link" href="GCharsetConverter.html" title="GCharsetConverter"><span class="type">GCharsetConverter</span></a> *converter</code></em>);
58
<a href="./../glib/glib/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> <a class="link" href="GCharsetConverter.html#g-charset-converter-get-num-fallbacks" title="g_charset_converter_get_num_fallbacks ()">g_charset_converter_get_num_fallbacks</a>
58
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> <a class="link" href="GCharsetConverter.html#g-charset-converter-get-num-fallbacks" title="g_charset_converter_get_num_fallbacks ()">g_charset_converter_get_num_fallbacks</a>
59
59
(<em class="parameter"><code><a class="link" href="GCharsetConverter.html" title="GCharsetConverter"><span class="type">GCharsetConverter</span></a> *converter</code></em>);
62
62
<div class="refsect1">
63
63
<a name="GCharsetConverter.object-hierarchy"></a><h2>Object Hierarchy</h2>
64
64
<pre class="synopsis">
65
<a href="./../gobject/gobject/gobject-The-Base-Object-Type.html#GObject">GObject</a>
65
<a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>
66
66
+----GCharsetConverter
75
75
<div class="refsect1">
76
76
<a name="GCharsetConverter.properties"></a><h2>Properties</h2>
77
77
<pre class="synopsis">
78
"<a class="link" href="GCharsetConverter.html#GCharsetConverter--from-charset" title='The "from-charset" property'>from-charset</a>" <a href="./../glib/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>* : Read / Write / Construct Only
79
"<a class="link" href="GCharsetConverter.html#GCharsetConverter--to-charset" title='The "to-charset" property'>to-charset</a>" <a href="./../glib/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>* : Read / Write / Construct Only
80
"<a class="link" href="GCharsetConverter.html#GCharsetConverter--use-fallback" title='The "use-fallback" property'>use-fallback</a>" <a href="./../glib/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> : Read / Write / Construct
78
"<a class="link" href="GCharsetConverter.html#GCharsetConverter--from-charset" title='The "from-charset" property'>from-charset</a>" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>* : Read / Write / Construct Only
79
"<a class="link" href="GCharsetConverter.html#GCharsetConverter--to-charset" title='The "to-charset" property'>to-charset</a>" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>* : Read / Write / Construct Only
80
"<a class="link" href="GCharsetConverter.html#GCharsetConverter--use-fallback" title='The "use-fallback" property'>use-fallback</a>" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> : Read / Write / Construct
83
83
<div class="refsect1">
100
100
<div class="refsect2">
101
101
<a name="g-charset-converter-new"></a><h3>g_charset_converter_new ()</h3>
102
<pre class="programlisting"><a class="link" href="GCharsetConverter.html" title="GCharsetConverter"><span class="returnvalue">GCharsetConverter</span></a> * g_charset_converter_new (<em class="parameter"><code>const <a href="./../glib/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *to_charset</code></em>,
103
<em class="parameter"><code>const <a href="./../glib/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *from_charset</code></em>,
104
<em class="parameter"><code><a href="./../glib/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
102
<pre class="programlisting"><a class="link" href="GCharsetConverter.html" title="GCharsetConverter"><span class="returnvalue">GCharsetConverter</span></a> * g_charset_converter_new (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *to_charset</code></em>,
103
<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *from_charset</code></em>,
104
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
106
106
Creates a new <a class="link" href="GCharsetConverter.html" title="GCharsetConverter"><span class="type">GCharsetConverter</span></a>.
108
<div class="variablelist"><table border="0" class="variablelist">
108
<div class="variablelist"><table border="0">
110
109
<col align="left" valign="top">
115
112
<td><p><span class="term"><em class="parameter"><code>to_charset</code></em> :</span></p></td>
123
120
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
125
<a href="./../glib/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> for error reporting, or <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore.</td>
122
<a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> for error reporting, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore.</td>
128
125
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
129
<td>a new <a class="link" href="GCharsetConverter.html" title="GCharsetConverter"><span class="type">GCharsetConverter</span></a> or <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error.</td>
126
<td>a new <a class="link" href="GCharsetConverter.html" title="GCharsetConverter"><span class="type">GCharsetConverter</span></a> or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error.</td>
137
134
<a name="g-charset-converter-set-use-fallback"></a><h3>g_charset_converter_set_use_fallback ()</h3>
138
135
<pre class="programlisting"><span class="returnvalue">void</span> g_charset_converter_set_use_fallback
139
136
(<em class="parameter"><code><a class="link" href="GCharsetConverter.html" title="GCharsetConverter"><span class="type">GCharsetConverter</span></a> *converter</code></em>,
140
<em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> use_fallback</code></em>);</pre>
137
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> use_fallback</code></em>);</pre>
142
139
Sets the <a class="link" href="GCharsetConverter.html#GCharsetConverter--use-fallback" title='The "use-fallback" property'><span class="type">"use-fallback"</span></a> property.
144
<div class="variablelist"><table border="0" class="variablelist">
141
<div class="variablelist"><table border="0">
146
142
<col align="left" valign="top">
151
145
<td><p><span class="term"><em class="parameter"><code>converter</code></em> :</span></p></td>
165
159
<div class="refsect2">
166
160
<a name="g-charset-converter-get-use-fallback"></a><h3>g_charset_converter_get_use_fallback ()</h3>
167
<pre class="programlisting"><a href="./../glib/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> g_charset_converter_get_use_fallback
161
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> g_charset_converter_get_use_fallback
168
162
(<em class="parameter"><code><a class="link" href="GCharsetConverter.html" title="GCharsetConverter"><span class="type">GCharsetConverter</span></a> *converter</code></em>);</pre>
170
164
Gets the <a class="link" href="GCharsetConverter.html#GCharsetConverter--use-fallback" title='The "use-fallback" property'><span class="type">"use-fallback"</span></a> property.
172
<div class="variablelist"><table border="0" class="variablelist">
166
<div class="variablelist"><table border="0">
174
167
<col align="left" valign="top">
179
170
<td><p><span class="term"><em class="parameter"><code>converter</code></em> :</span></p></td>
184
175
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
186
<a href="./../glib/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if fallbacks are used by <em class="parameter"><code>converter</code></em>
177
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if fallbacks are used by <em class="parameter"><code>converter</code></em>
194
185
<div class="refsect2">
195
186
<a name="g-charset-converter-get-num-fallbacks"></a><h3>g_charset_converter_get_num_fallbacks ()</h3>
196
<pre class="programlisting"><a href="./../glib/glib/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> g_charset_converter_get_num_fallbacks
187
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> g_charset_converter_get_num_fallbacks
197
188
(<em class="parameter"><code><a class="link" href="GCharsetConverter.html" title="GCharsetConverter"><span class="type">GCharsetConverter</span></a> *converter</code></em>);</pre>
199
190
Gets the number of fallbacks that <em class="parameter"><code>converter</code></em> has applied so far.
201
<div class="variablelist"><table border="0" class="variablelist">
192
<div class="variablelist"><table border="0">
203
193
<col align="left" valign="top">
208
196
<td><p><span class="term"><em class="parameter"><code>converter</code></em> :</span></p></td>
222
210
<a name="GCharsetConverter.property-details"></a><h2>Property Details</h2>
223
211
<div class="refsect2">
224
212
<a name="GCharsetConverter--from-charset"></a><h3>The <code class="literal">"from-charset"</code> property</h3>
225
<pre class="programlisting"> "from-charset" <a href="./../glib/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>* : Read / Write / Construct Only</pre>
213
<pre class="programlisting"> "from-charset" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>* : Read / Write / Construct Only</pre>
226
214
<p>The character encoding to convert from.</p>
227
215
<p>Default value: NULL</p>
230
218
<div class="refsect2">
231
219
<a name="GCharsetConverter--to-charset"></a><h3>The <code class="literal">"to-charset"</code> property</h3>
232
<pre class="programlisting"> "to-charset" <a href="./../glib/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>* : Read / Write / Construct Only</pre>
220
<pre class="programlisting"> "to-charset" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>* : Read / Write / Construct Only</pre>
233
221
<p>The character encoding to convert to.</p>
234
222
<p>Default value: NULL</p>
237
225
<div class="refsect2">
238
226
<a name="GCharsetConverter--use-fallback"></a><h3>The <code class="literal">"use-fallback"</code> property</h3>
239
<pre class="programlisting"> "use-fallback" <a href="./../glib/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> : Read / Write / Construct</pre>
227
<pre class="programlisting"> "use-fallback" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> : Read / Write / Construct</pre>
240
228
<p>Use fallback (of form \<hexval>) for invalid bytes.</p>
241
229
<p>Default value: FALSE</p>