diff options
author | Robert Brady <robert@suse.co.uk> | 2000-11-12 21:23:55 +0000 |
---|---|---|
committer | Robert Brady <rbrady@src.gnome.org> | 2000-11-12 21:23:55 +0000 |
commit | 8bda01029faf3078a83c45fcdfbfcbd3368ad475 (patch) | |
tree | 1d93b819bae5427af96f0b9a8951578ae9583be3 /gconvert.h | |
parent | 91d5e23f5fa8b9eda5cf07c3aedec46256183550 (diff) | |
download | glib-8bda01029faf3078a83c45fcdfbfcbd3368ad475.tar.gz |
Remove g_filename_{to,from}_utf8
2000-11-12 Robert Brady <robert@suse.co.uk>
* gstrfuncs.c, gstrfuncs.h: Remove g_filename_{to,from}_utf8
* gconvert.c, gconvert.h: Add g_filename_{to,from}_utf8 and
g_locale_{to.from}_utf8. The locale_ variant honours
nl_langinfo(CODESET), the filename_ variant uses UTF-8 unless
asked otherwise.
(g_convert): Add G_CONVERT_ERROR_PARTIAL_INPUT error, if bytesread
!= length and no bytesread pointer passed.
Diffstat (limited to 'gconvert.h')
-rw-r--r-- | gconvert.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/gconvert.h b/gconvert.h index 0586a19c1..1eaed3ece 100644 --- a/gconvert.h +++ b/gconvert.h @@ -35,7 +35,8 @@ typedef enum { G_CONVERT_ERROR_NO_CONVERSION, G_CONVERT_ERROR_ILLEGAL_SEQUENCE, - G_CONVERT_ERROR_FAILED + G_CONVERT_ERROR_FAILED, + G_CONVERT_ERROR_PARTIAL_INPUT, } GConvertError; #define G_CONVERT_ERROR g_convert_error_quark() @@ -57,6 +58,18 @@ gchar* g_convert_with_fallback (const gchar *str, gint *bytes_written, GError **error); + +/* Convert between libc's idea of strings and UTF-8. + */ +gchar* g_locale_to_utf8 (const gchar *opsysstring, GError **error); +gchar* g_locale_from_utf8 (const gchar *utf8string, GError **error); + +/* Convert between the operating system (or C runtime) + * representation of file names and UTF-8. + */ +gchar* g_filename_to_utf8 (const gchar *opsysstring, GError **error); +gchar* g_filename_from_utf8 (const gchar *utf8string, GError **error); + G_END_DECLS #endif /* __G_CONVERT_H__ */ |