Use iconv to convert filenames from UTF-8.
Patch by miniupnp, with some C89 adjustments. Enabled for Haiku and the generic Linux/*BSD part of the Makefile. Please adjust as needed. Fixes #10 for codepages for which we have a font. git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@2172 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
12
src/global.h
12
src/global.h
@@ -854,6 +854,18 @@ GFX2_GLOBAL signed char File_error;
|
||||
/// Current line number when reading/writing gfx2.ini
|
||||
GFX2_GLOBAL int Line_number_in_INI_file;
|
||||
|
||||
// -- For iconv
|
||||
|
||||
#ifdef ENABLE_FILENAMES_ICONV
|
||||
|
||||
#include <iconv.h>
|
||||
|
||||
#define TOCODE "CP1252"
|
||||
#define FROMCODE "UTF-8"
|
||||
GFX2_GLOBAL iconv_t cd;
|
||||
GFX2_GLOBAL iconv_t cd_inv;
|
||||
#endif /* ENABLE_FILENAMES_ICONV */
|
||||
|
||||
// -- Specific to SDL
|
||||
|
||||
/// Pointer to the program's screen.
|
||||
|
||||
Reference in New Issue
Block a user