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.75.2">
6
<meta name="generator" content="DocBook XSL Stylesheets V1.75.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
<link rel="next" href="gio-GZlibCompressor.html" title="GZlibCompressor">
11
<meta name="generator" content="GTK-Doc V1.13 (XML mode)">
10
<link rel="next" href="GZlibCompressor.html" title="GZlibCompressor">
11
<meta name="generator" content="GTK-Doc V1.11 (XML mode)">
12
12
<link rel="stylesheet" href="style.css" type="text/css">
13
13
<link rel="part" href="pt01.html" title="Part I. GIO Overview">
14
14
<link rel="chapter" href="ch01.html" title="Introduction">
48
48
<td><a accesskey="u" href="conversion.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
49
49
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
50
50
<th width="100%" align="center">GIO Reference Manual</th>
51
<td><a accesskey="n" href="gio-GZlibCompressor.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
51
<td><a accesskey="n" href="GZlibCompressor.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
53
53
<tr><td colspan="5" class="shortcuts">
54
54
<a href="#GCharsetConverter.synopsis" class="shortcut">Top</a>
56
<a href="#GCharsetConverter.description" class="shortcut">Description</a>
58
<a href="#GCharsetConverter.object-hierarchy" class="shortcut">Object Hierarchy</a>
60
<a href="#GCharsetConverter.implemented-interfaces" class="shortcut">Implemented Interfaces</a>
62
<a href="#GCharsetConverter.properties" class="shortcut">Properties</a>
56
<a href="#GCharsetConverter.description" class="shortcut">Description</a>
58
<a href="#GCharsetConverter.object-hierarchy" class="shortcut">Object Hierarchy</a>
60
<a href="#GCharsetConverter.implemented-interfaces" class="shortcut">Implemented Interfaces</a>
62
<a href="#GCharsetConverter.properties" class="shortcut">Properties</a>
65
65
<div class="refentry" title="GCharsetConverter">
74
74
<div class="refsynopsisdiv" title="Synopsis">
75
75
<a name="GCharsetConverter.synopsis"></a><h2>Synopsis</h2>
76
76
<pre class="synopsis">
77
78
#include <gio/gio.h>
79
80
<a class="link" href="GCharsetConverter.html#GCharsetConverter-struct" title="GCharsetConverter">GCharsetConverter</a>;
80
<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> (const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *to_charset,
81
const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *from_charset,
82
<a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="returnvalue">GError</span></a> **error);
83
<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>
84
(<a class="link" href="GCharsetConverter.html" title="GCharsetConverter"><span class="returnvalue">GCharsetConverter</span></a> *converter,
85
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> use_fallback);
86
<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>
87
(<a class="link" href="GCharsetConverter.html" title="GCharsetConverter"><span class="returnvalue">GCharsetConverter</span></a> *converter);
88
<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>
89
(<a class="link" href="GCharsetConverter.html" title="GCharsetConverter"><span class="returnvalue">GCharsetConverter</span></a> *converter);
81
<a class="link" href="GCharsetConverter.html" title="GCharsetConverter">GCharsetConverter</a> * <a class="link" href="GCharsetConverter.html#g-charset-converter-new" title="g_charset_converter_new ()">g_charset_converter_new</a> (const <a
82
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"
83
>gchar</a> *to_charset,
85
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"
86
>gchar</a> *from_charset,
88
href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"
90
void <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>
91
(<a class="link" href="GCharsetConverter.html" title="GCharsetConverter">GCharsetConverter</a> *converter,
93
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"
94
>gboolean</a> use_fallback);
96
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"
97
>gboolean</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>
98
(<a class="link" href="GCharsetConverter.html" title="GCharsetConverter">GCharsetConverter</a> *converter);
100
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"
101
>guint</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>
102
(<a class="link" href="GCharsetConverter.html" title="GCharsetConverter">GCharsetConverter</a> *converter);
92
105
<div class="refsect1" title="Object Hierarchy">
93
106
<a name="GCharsetConverter.object-hierarchy"></a><h2>Object Hierarchy</h2>
94
107
<pre class="synopsis">
95
<a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>
96
109
+----GCharsetConverter
105
118
<div class="refsect1" title="Properties">
106
119
<a name="GCharsetConverter.properties"></a><h2>Properties</h2>
107
120
<pre class="synopsis">
108
"<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
109
"<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
110
"<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
121
"<a class="link" href="GCharsetConverter.html#GCharsetConverter--from-charset" title='The "from-charset" property'>from-charset</a>" <a
122
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"
123
>gchar</a>* : Read / Write / Construct Only
124
"<a class="link" href="GCharsetConverter.html#GCharsetConverter--to-charset" title='The "to-charset" property'>to-charset</a>" <a
125
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"
126
>gchar</a>* : Read / Write / Construct Only
127
"<a class="link" href="GCharsetConverter.html#GCharsetConverter--use-fallback" title='The "use-fallback" property'>use-fallback</a>" <a
128
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"
129
>gboolean</a> : Read / Write / Construct
113
132
<div class="refsect1" title="Description">
123
144
<pre class="programlisting">typedef struct _GCharsetConverter GCharsetConverter;</pre>
125
146
Conversions between character sets.</p>
128
151
<div class="refsect2" title="g_charset_converter_new ()">
129
152
<a name="g-charset-converter-new"></a><h3>g_charset_converter_new ()</h3>
130
<pre class="programlisting"><a class="link" href="GCharsetConverter.html" title="GCharsetConverter"><span class="returnvalue">GCharsetConverter</span></a> * g_charset_converter_new (const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *to_charset,
131
const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *from_charset,
132
<a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="returnvalue">GError</span></a> **error);</pre>
153
<pre class="programlisting"><a class="link" href="GCharsetConverter.html" title="GCharsetConverter">GCharsetConverter</a> * g_charset_converter_new (const <a
154
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"
155
>gchar</a> *to_charset,
157
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"
158
>gchar</a> *from_charset,
160
href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"
161
>GError</a> **error);</pre>
134
163
Creates a new <a class="link" href="GCharsetConverter.html" title="GCharsetConverter"><span class="type">GCharsetConverter</span></a>.</p>
135
166
<div class="variablelist"><table border="0">
136
167
<col align="left" valign="top">
149
180
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
150
<td> <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.
182
href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"
183
><span class="type">GError</span></a> for error reporting, or <a
184
href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL--CAPS"
185
><code class="literal">NULL</code></a> to ignore.
154
189
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
155
<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.
190
<td> a new <a class="link" href="GCharsetConverter.html" title="GCharsetConverter"><span class="type">GCharsetConverter</span></a> or <a
191
href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL--CAPS"
192
><code class="literal">NULL</code></a> on error.
164
201
<div class="refsect2" title="g_charset_converter_set_use_fallback ()">
165
202
<a name="g-charset-converter-set-use-fallback"></a><h3>g_charset_converter_set_use_fallback ()</h3>
166
<pre class="programlisting"><span class="returnvalue">void</span> g_charset_converter_set_use_fallback
167
(<a class="link" href="GCharsetConverter.html" title="GCharsetConverter"><span class="returnvalue">GCharsetConverter</span></a> *converter,
168
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> use_fallback);</pre>
203
<pre class="programlisting">void g_charset_converter_set_use_fallback
204
(<a class="link" href="GCharsetConverter.html" title="GCharsetConverter">GCharsetConverter</a> *converter,
206
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"
207
>gboolean</a> use_fallback);</pre>
170
209
Sets the <a class="link" href="GCharsetConverter.html#GCharsetConverter--use-fallback" title='The "use-fallback" property'><span class="type">"use-fallback"</span></a> property.</p>
171
212
<div class="variablelist"><table border="0">
172
213
<col align="left" valign="top">
189
232
<div class="refsect2" title="g_charset_converter_get_use_fallback ()">
190
233
<a name="g-charset-converter-get-use-fallback"></a><h3>g_charset_converter_get_use_fallback ()</h3>
191
<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
192
(<a class="link" href="GCharsetConverter.html" title="GCharsetConverter"><span class="returnvalue">GCharsetConverter</span></a> *converter);</pre>
234
<pre class="programlisting"><a
235
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"
236
>gboolean</a> g_charset_converter_get_use_fallback
237
(<a class="link" href="GCharsetConverter.html" title="GCharsetConverter">GCharsetConverter</a> *converter);</pre>
194
239
Gets the <a class="link" href="GCharsetConverter.html#GCharsetConverter--use-fallback" title='The "use-fallback" property'><span class="type">"use-fallback"</span></a> property.</p>
195
242
<div class="variablelist"><table border="0">
196
243
<col align="left" valign="top">
214
263
<div class="refsect2" title="g_charset_converter_get_num_fallbacks ()">
215
264
<a name="g-charset-converter-get-num-fallbacks"></a><h3>g_charset_converter_get_num_fallbacks ()</h3>
216
<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
217
(<a class="link" href="GCharsetConverter.html" title="GCharsetConverter"><span class="returnvalue">GCharsetConverter</span></a> *converter);</pre>
265
<pre class="programlisting"><a
266
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"
267
>guint</a> g_charset_converter_get_num_fallbacks
268
(<a class="link" href="GCharsetConverter.html" title="GCharsetConverter">GCharsetConverter</a> *converter);</pre>
219
270
Gets the number of fallbacks that <em class="parameter"><code>converter</code></em> has applied so far.</p>
220
273
<div class="variablelist"><table border="0">
221
274
<col align="left" valign="top">
240
293
<a name="GCharsetConverter.property-details"></a><h2>Property Details</h2>
241
294
<div class="refsect2" title='The "from-charset" property'>
242
295
<a name="GCharsetConverter--from-charset"></a><h3>The <code class="literal">"from-charset"</code> property</h3>
243
<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>
296
<pre class="programlisting"> "from-charset" <a
297
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"
298
>gchar</a>* : Read / Write / Construct Only</pre>
244
299
<p>The character encoding to convert from.</p>
245
300
<p>Default value: NULL</p>
248
303
<div class="refsect2" title='The "to-charset" property'>
249
304
<a name="GCharsetConverter--to-charset"></a><h3>The <code class="literal">"to-charset"</code> property</h3>
250
<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>
305
<pre class="programlisting"> "to-charset" <a
306
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"
307
>gchar</a>* : Read / Write / Construct Only</pre>
251
308
<p>The character encoding to convert to.</p>
252
309
<p>Default value: NULL</p>
255
312
<div class="refsect2" title='The "use-fallback" property'>
256
313
<a name="GCharsetConverter--use-fallback"></a><h3>The <code class="literal">"use-fallback"</code> property</h3>
257
<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>
314
<pre class="programlisting"> "use-fallback" <a
315
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"
316
>gboolean</a> : Read / Write / Construct</pre>
258
317
<p>Use fallback (of form \<hexval>) for invalid bytes.</p>
259
318
<p>Default value: FALSE</p>