Index: client/Text.cpp =================================================================== RCS file: /cvsroot/linuxdcpp/linuxdcpp/client/Text.cpp,v retrieving revision 1.14 diff -u -1 -r1.14 Text.cpp --- client/Text.cpp 7 Feb 2007 03:27:05 -0000 1.14 +++ client/Text.cpp 24 Feb 2007 00:44:57 -0000 @@ -26,2 +26,3 @@ #include +#include @@ -37,4 +38,4 @@ setlocale(LC_ALL, ""); - - char *ctype = setlocale(LC_CTYPE, NULL); +#ifndef _WIN32 + char *ctype = nl_langinfo(CODESET); if(ctype) { @@ -44,2 +45,5 @@ } +#else + // @todo Is there a nl_langinfo replacement in windows? +#endif } @@ -286,8 +290,4 @@ - if(str.empty() || from == to) + if(str.empty()) return tmp = str; - if(to == "utf-8" && (fromCharset.empty() || fromCharset == systemCharset)) - return acpToUtf8(str, tmp); - if(from == "utf-8" && (toCharset.empty() || toCharset == systemCharset)) - return utf8ToAcp(str, tmp);