glib.h New functions for conversion between UTF-8 and the encoding

2000-02-01  Tor Lillqvist  <tml@iki.fi>

* glib.h
* gstrfuncs.c (g_filename_to_utf8, g_filename_from_utf8): New
functions for conversion between UTF-8 and the encoding expected
by C runtime functions like open() and stat(), and returned by
readdir().

Implement them on Win32 where we use the system "ANSI" codepage,
which might be single-byte or double-byte. On Unix, just skip the
issue for now and provide dummy implementations that return a copy
of the argument.

* README.win32
* build-dll
* glib.def: Minor updates.
This commit is contained in:
Tor Lillqvist
2000-02-02 23:39:32 +00:00
committed by Tor Lillqvist
parent 86b2741c1e
commit c22cf34e92
16 changed files with 637 additions and 10 deletions

7
glib.h
View File

@@ -1604,6 +1604,13 @@ gchar* g_strcompress (const gchar *source);
*/
gchar* g_strescape (const gchar *source,
const gchar *exceptions);
/*
* Convert between the operating system (or C runtime)
* representation of file names and UTF-8.
*/
gchar* g_filename_to_utf8 (const gchar *opsysstring);
gchar* g_filename_from_utf8 (const gchar *utf8string);
/* Deprecated API:
* gchar* g_strescape (const gchar *source);
* Luckily this function wasn't much used.