mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-09-06 16:08:43 +02:00
Create wrapper functions for iconv() so that we can transparently use the
Sun Nov 12 18:34:32 2000 Owen Taylor <otaylor@redhat.com> * gconvert.[ch]: Create wrapper functions for iconv() so that we can transparently use the native iconv, libiconv, or (in the future) a mini-iconv included with glib. * glib-config-2.0.in glib-2.0.pc.in: Include @ICONV_LIBS@ * INSTALL: Added note about libiconv. * configure.in: Add checks for libiconv from pango. If EILSEQ is not defined in errno.h add define for it into glibconfig.h so g_iconv can use it. (Note, recompiling from a system without EILSEQ to a system with EILSEQ will break binary compatibility)
This commit is contained in:
@@ -27,6 +27,7 @@
|
||||
#ifndef __G_CONVERT_H__
|
||||
#define __G_CONVERT_H__
|
||||
|
||||
#include <stddef.h> /* For size_t */
|
||||
#include <gerror.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
@@ -42,6 +43,20 @@ typedef enum
|
||||
#define G_CONVERT_ERROR g_convert_error_quark()
|
||||
GQuark g_convert_error_quark();
|
||||
|
||||
/* Thin wrappers around iconv
|
||||
*/
|
||||
typedef struct _GIConv *GIConv;
|
||||
|
||||
GIConv g_iconv_open (const gchar *to_codeset,
|
||||
const gchar *from_codeset);
|
||||
size_t g_iconv (GIConv converter,
|
||||
gchar **inbuf,
|
||||
size_t *inbytes_left,
|
||||
gchar **outbuf,
|
||||
size_t *outbytes_left);
|
||||
gint g_iconv_close (GIConv converter);
|
||||
|
||||
|
||||
gchar* g_convert (const gchar *str,
|
||||
gint len,
|
||||
const gchar *to_codeset,
|
||||
|
Reference in New Issue
Block a user