From 5e3bbca49f551d2622396903acfabb7a4c4428e3 Mon Sep 17 00:00:00 2001 From: Thomas BERNARD Date: Tue, 13 Feb 2018 12:21:46 +0100 Subject: [PATCH] Enable UTF8 filename conversion for OS X HFS drives are using combining characters, so use UTF-8-MAC encoding for iconv --- src/Makefile | 2 ++ src/global.h | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/src/Makefile b/src/Makefile index 8730b98d..b3c790f6 100644 --- a/src/Makefile +++ b/src/Makefile @@ -155,6 +155,8 @@ else endif LOPT += -lz endif + COPT += -DENABLE_FILENAMES_ICONV + LOPT += -liconv # Use gcc for compiling. Use ncc to build a callgraph and analyze the code. CC = gcc #CC = nccgen -ncgcc -ncld -ncfabs diff --git a/src/global.h b/src/global.h index 1abb0894..6b669065 100644 --- a/src/global.h +++ b/src/global.h @@ -760,7 +760,11 @@ GFX2_GLOBAL int Line_number_in_INI_file; #include #define TOCODE "CP1252" +#ifdef __macosx__ +#define FROMCODE "UTF-8-MAC" +#else #define FROMCODE "UTF-8" +#endif GFX2_GLOBAL iconv_t cd; GFX2_GLOBAL iconv_t cd_inv; #endif /* ENABLE_FILENAMES_ICONV */