if locale are set to C, do not do encoding convertion

This commit is contained in:
Andrzej Rybczak
2009-01-30 15:27:35 +01:00
parent ec38d57c9b
commit 865385e309

View File

@@ -92,7 +92,7 @@ namespace
void init_current_locale()
{
std::string envlocale = setlocale(LC_CTYPE, "");
if (envlocale.empty())
if (envlocale.empty() || envlocale == "C")
return;
std::ifstream f(SUPPORTED_LOCALES);
if (!f.is_open())