diff --git a/goldlib/gall/gcharset.cpp b/goldlib/gall/gcharset.cpp index c66746a..de6163d 100644 --- a/goldlib/gall/gcharset.cpp +++ b/goldlib/gall/gcharset.cpp @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #ifdef __WIN32__ @@ -113,6 +114,14 @@ const char *get_dos_charset(const char *cpfrom) if(strieql(cpfrom, cpmap[i].from)) return cpmap[i].to; } + #if defined(__unix__) + char* lang = getenv("LANG"); + if( lang && strncmp(lang,"ru_RU",4) ) { + return "CP866"; + }else{ + return "CP437"; + } + #endif return ""; #endif }