From f3022891df7dc2c10003bd72cf49ee195d531a07 Mon Sep 17 00:00:00 2001 From: Henning Guenther Date: Sun, 14 Feb 2010 15:19:39 -0800 Subject: [PATCH] Remove nl_langinfo hack Ignore-this: 1f46fdb32bd81d98cd52744377da3dbb darcs-hash:20100214231939-a4fee-53f1a968c4e6a89f1526bbb85d9926688de4afda --- system_encoding.c | 7 ++----- system_encoding.h | 3 +-- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/system_encoding.c b/system_encoding.c index d9bf42f..b3b4d25 100644 --- a/system_encoding.c +++ b/system_encoding.c @@ -1,9 +1,6 @@ #include "system_encoding.h" char* get_system_encoding() { -#if !defined(mingw32_HOST_OS) && !defined(__MINGW32__) - return nl_langinfo(CODESET); -#else - return "ASCII"; -#endif + setlocale(LC_ALL,""); + return nl_langinfo(CODESET); } diff --git a/system_encoding.h b/system_encoding.h index 63cf6b1..c64015a 100644 --- a/system_encoding.h +++ b/system_encoding.h @@ -1,9 +1,8 @@ #ifndef __SYSTEM_ENCODING__ #define __SYSTEM_ENCODING__ -#if !defined(mingw32_HOST_OS) && !defined(__MINGW32__) #include -#endif +#include char* get_system_encoding();