GCharsetConverter

GCharsetConverter — Convert between charsets

Synopsis


#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);

Description

GCharsetConverter is an implementation of GConverter based on GIConv.

Details

GCharsetConverter

typedef struct _GCharsetConverter GCharsetConverter;

Conversions between character sets.


g_charset_converter_new ()

GCharsetConverter * g_charset_converter_new             (const gchar *to_charset,
                                                         const gchar *from_charset,
                                                         GError **error);

Creates a new GCharsetConverter.

to_charset :

destination charset

from_charset :

source charset

error :

GError for error reporting, or NULL to ignore.

Returns :

a new GCharsetConverter or NULL on error.

Since 2.24


g_charset_converter_set_use_fallback ()

void                g_charset_converter_set_use_fallback
                                                        (GCharsetConverter *converter,
                                                         gboolean use_fallback);

Sets the "use-fallback" property.

converter :

a GCharsetConverter

use_fallback :

TRUE to use fallbacks

Since 2.24


g_charset_converter_get_use_fallback ()

gboolean            g_charset_converter_get_use_fallback
                                                        (GCharsetConverter *converter);

Gets the "use-fallback" property.

converter :

a GCharsetConverter

Returns :

TRUE if fallbacks are used by converter

Since 2.24


g_charset_converter_get_num_fallbacks ()

guint               g_charset_converter_get_num_fallbacks
                                                        (GCharsetConverter *converter);

Gets the number of fallbacks that converter has applied so far.

converter :

a GCharsetConverter

Returns :

the number of fallbacks that converter has applied

Since 2.24