Use GLib's g_fopen() and g_open() when working with files

On Windows, the GLib wrappers for fopen() and open() deal with the UTF-8
format used for file names when we have to open or save a file with
unicode characters in its name.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Lubomir I. Ivanov 2012-10-03 17:29:01 +03:00 committed by Dirk Hohndel
parent f3b9a37fb2
commit 4f18f83ce9
2 changed files with 3 additions and 3 deletions

View file

@ -352,7 +352,7 @@ void save_dives(const char *filename)
struct dive *dive;
dive_trip_t *trip = NULL;
FILE *f = fopen(filename, "w");
FILE *f = g_fopen(filename, "w");
if (!f)
return;