mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-24 01:48:53 +02:00
Havoc Pennington's implementation of convenient character set conversion
Sun Sep 10 12:37:40 2000 Owen Taylor <otaylor@redhat.com> * glib.h gconvert.c (g_convert): Havoc Pennington's implementation of convenient character set conversion using iconv, with the addition of GError. We probably need a fallback that just does conversions between, say UTF-8,16,32 and ISO-8859-1 for targets without iconv at all. Also add g_convert_with_fallback() to take care of conversions where we accept some loss going to the target encoding.
This commit is contained in:
26
glib/glib.h
26
glib/glib.h
@@ -3403,6 +3403,32 @@ guint g_thread_pool_get_num_unused_threads (void);
|
||||
/* Stop all currently unused threads, but leave the limit untouched */
|
||||
void g_thread_pool_stop_unused_threads (void);
|
||||
|
||||
typedef enum
|
||||
{
|
||||
G_CONVERT_ERROR_NO_CONVERSION,
|
||||
G_CONVERT_ERROR_ILLEGAL_SEQUENCE,
|
||||
G_CONVERT_ERROR_OTHER
|
||||
} GConvertError;
|
||||
|
||||
#define G_CONVERT_ERROR g_convert_error_quark()
|
||||
GQuark g_convert_error_quark();
|
||||
|
||||
gchar* g_convert (const gchar *str,
|
||||
gint len,
|
||||
const gchar *to_codeset,
|
||||
const gchar *from_codeset,
|
||||
gint *bytes_read,
|
||||
gint *bytes_written,
|
||||
GError **error);
|
||||
gchar* g_convert_with_fallback (const gchar *str,
|
||||
gint len,
|
||||
const gchar *to_codeset,
|
||||
const gchar *from_codeset,
|
||||
gchar *fallback,
|
||||
gint *bytes_read,
|
||||
gint *bytes_written,
|
||||
GError **error);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
Reference in New Issue
Block a user