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:
Adrien Destugues
2016-12-02 19:43:23 +00:00
parent 0ce386bb19
commit 0eaf3fce96
6 changed files with 117 additions and 13 deletions

View File

@@ -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.