00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #ifndef __G_CONVERT_H__
00028 #define __G_CONVERT_H__
00029
00030 #include <stddef.h>
00031 #include <gerror.h>
00032
00033 G_BEGIN_DECLS
00034
00035 typedef enum
00036 {
00037 G_CONVERT_ERROR_NO_CONVERSION,
00038 G_CONVERT_ERROR_ILLEGAL_SEQUENCE,
00039 G_CONVERT_ERROR_FAILED,
00040 G_CONVERT_ERROR_PARTIAL_INPUT
00041 } GConvertError;
00042
00043 #define G_CONVERT_ERROR g_convert_error_quark()
00044 GQuark g_convert_error_quark();
00045
00046
00047
00048 typedef struct _GIConv *GIConv;
00049
00050 GIConv g_iconv_open (const gchar *to_codeset,
00051 const gchar *from_codeset);
00052 size_t g_iconv (GIConv converter,
00053 gchar **inbuf,
00054 size_t *inbytes_left,
00055 gchar **outbuf,
00056 size_t *outbytes_left);
00057 gint g_iconv_close (GIConv converter);
00058
00059
00060 gchar* g_convert (const gchar *str,
00061 gint len,
00062 const gchar *to_codeset,
00063 const gchar *from_codeset,
00064 gint *bytes_read,
00065 gint *bytes_written,
00066 GError **error);
00067 gchar* g_convert_with_fallback (const gchar *str,
00068 gint len,
00069 const gchar *to_codeset,
00070 const gchar *from_codeset,
00071 gchar *fallback,
00072 gint *bytes_read,
00073 gint *bytes_written,
00074 GError **error);
00075
00076
00077
00078
00079 gchar* g_locale_to_utf8 (const gchar *opsysstring, GError **error);
00080 gchar* g_locale_from_utf8 (const gchar *utf8string, GError **error);
00081
00082
00083
00084
00085 gchar* g_filename_to_utf8 (const gchar *opsysstring, GError **error);
00086 gchar* g_filename_from_utf8 (const gchar *utf8string, GError **error);
00087
00088 G_END_DECLS
00089
00090 #endif