Enable UTF8 filename conversion for OS X

HFS drives are using combining characters, so use
UTF-8-MAC encoding for iconv
This commit is contained in:
Thomas BERNARD 2018-02-13 12:21:46 +01:00 committed by Thomas Bernard
parent ffbf51a363
commit 5e3bbca49f
2 changed files with 6 additions and 0 deletions

View File

@ -155,6 +155,8 @@ else
endif endif
LOPT += -lz LOPT += -lz
endif endif
COPT += -DENABLE_FILENAMES_ICONV
LOPT += -liconv
# Use gcc for compiling. Use ncc to build a callgraph and analyze the code. # Use gcc for compiling. Use ncc to build a callgraph and analyze the code.
CC = gcc CC = gcc
#CC = nccgen -ncgcc -ncld -ncfabs #CC = nccgen -ncgcc -ncld -ncfabs

View File

@ -760,7 +760,11 @@ GFX2_GLOBAL int Line_number_in_INI_file;
#include <iconv.h> #include <iconv.h>
#define TOCODE "CP1252" #define TOCODE "CP1252"
#ifdef __macosx__
#define FROMCODE "UTF-8-MAC"
#else
#define FROMCODE "UTF-8" #define FROMCODE "UTF-8"
#endif
GFX2_GLOBAL iconv_t cd; GFX2_GLOBAL iconv_t cd;
GFX2_GLOBAL iconv_t cd_inv; GFX2_GLOBAL iconv_t cd_inv;
#endif /* ENABLE_FILENAMES_ICONV */ #endif /* ENABLE_FILENAMES_ICONV */