From 73bd6af0f9f1ce9c535ff0a4227e29df3631eb45 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 22 Jun 2015 22:20:10 +0200 Subject: fs/Charset: hard-code Windows to ACP Don't define HAVE_FS_CHARSET, and make GetFSCharset() return "ACP" instead of "UTF-8". Ignore the configuration setting, which had no effect anyway. --- src/fs/Config.cxx | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) (limited to 'src/fs/Config.cxx') diff --git a/src/fs/Config.cxx b/src/fs/Config.cxx index 623736c54..dd809d8b0 100644 --- a/src/fs/Config.cxx +++ b/src/fs/Config.cxx @@ -22,10 +22,7 @@ #include "Charset.hxx" #include "config/ConfigGlobal.hxx" -#ifdef WIN32 -#include // for GetACP() -#include // for sprintf() -#elif defined(HAVE_GLIB) +#ifdef HAVE_GLIB #include #endif @@ -37,16 +34,7 @@ ConfigureFS(Error &error) charset = config_get_string(ConfigOption::FS_CHARSET, nullptr); if (charset == nullptr) { -#ifdef WIN32 - /* Glib claims that file system encoding is always utf-8 - * on native Win32 (i.e. not Cygwin). - * However this is true only if helpers are used. - * MPD uses regular functions. - * Those functions use encoding determined by GetACP(). */ - static char win_charset[13]; - sprintf(win_charset, "cp%u", GetACP()); - charset = win_charset; -#elif defined(HAVE_GLIB) +#ifdef HAVE_GLIB const gchar **encodings; g_get_filename_charsets(&encodings); -- cgit v1.2.3