diff --git a/system_encoding.c b/system_encoding.c index 96d4213..d9bf42f 100644 --- a/system_encoding.c +++ b/system_encoding.c @@ -1,5 +1,9 @@ #include "system_encoding.h" char* get_system_encoding() { +#if !defined(mingw32_HOST_OS) && !defined(__MINGW32__) return nl_langinfo(CODESET); +#else + return "ASCII"; +#endif } diff --git a/system_encoding.h b/system_encoding.h index 286a8aa..63cf6b1 100644 --- a/system_encoding.h +++ b/system_encoding.h @@ -1,7 +1,9 @@ #ifndef __SYSTEM_ENCODING__ #define __SYSTEM_ENCODING__ +#if !defined(mingw32_HOST_OS) && !defined(__MINGW32__) #include +#endif char* get_system_encoding();