|  |  |  | GIO Reference Manual |  | 
|---|---|---|---|---|
| Top | Description | Object Hierarchy | Implemented Interfaces | Properties | ||||
#include <gio/gio.h>
                    GCharsetConverter;
GCharsetConverter * g_charset_converter_new             (const gchar *to_charset,
                                                         const gchar *from_charset,
                                                         GError **error);
void                g_charset_converter_set_use_fallback
                                                        (GCharsetConverter *converter,
                                                         gboolean use_fallback);
gboolean            g_charset_converter_get_use_fallback
                                                        (GCharsetConverter *converter);
guint               g_charset_converter_get_num_fallbacks
                                                        (GCharsetConverter *converter);
"from-charset" gchar* : Read / Write / Construct Only "to-charset" gchar* : Read / Write / Construct Only "use-fallback" gboolean : Read / Write / Construct
typedef struct _GCharsetConverter GCharsetConverter;
Conversions between character sets.
GCharsetConverter * g_charset_converter_new (const gchar *to_charset,const gchar *from_charset,GError **error);
Creates a new GCharsetConverter.
| 
 | destination charset | 
| 
 | source charset | 
| 
 | GError for error reporting, or NULLto ignore. | 
| Returns : | a new GCharsetConverter or NULLon error. | 
Since 2.24
void g_charset_converter_set_use_fallback (GCharsetConverter *converter,gboolean use_fallback);
Sets the "use-fallback" property.
| 
 | a GCharsetConverter | 
| 
 | TRUEto use fallbacks | 
Since 2.24
gboolean            g_charset_converter_get_use_fallback
                                                        (GCharsetConverter *converter);
Gets the "use-fallback" property.
| 
 | a GCharsetConverter | 
| Returns : | TRUEif fallbacks are used byconverter | 
Since 2.24
guint               g_charset_converter_get_num_fallbacks
                                                        (GCharsetConverter *converter);
Gets the number of fallbacks that converter has applied so far.
| 
 | a GCharsetConverter | 
| Returns : | the number of fallbacks that converterhas applied | 
Since 2.24
"from-charset" property"from-charset" gchar* : Read / Write / Construct Only
The character encoding to convert from.
Default value: NULL
"to-charset" property"to-charset" gchar* : Read / Write / Construct Only
The character encoding to convert to.
Default value: NULL
"use-fallback" property"use-fallback" gboolean : Read / Write / Construct
Use fallback (of form \<hexval>) for invalid bytes.
Default value: FALSE