#136: adjustment in par2-module

using built-in latin1-to-utf8 conversion routine instead of Windows
function (which depend on current code page).
This commit is contained in:
Andrey Prygunkov
2015-12-29 22:53:36 +01:00
parent 5df8f73b20
commit 3aa97e44e7
3 changed files with 2 additions and 15 deletions

View File

@@ -830,18 +830,6 @@ CString FileSystem::WidePathToUtfPath(const wchar_t* wpath)
int copied = WideCharToMultiByte(CP_UTF8, 0, wpath, -1, utfstr, 1024, NULL, NULL);
return utfstr;
}
CString FileSystem::AnsiPathToUtfPath(const char* ansipath)
{
wchar_t wstr[1024];
char utfstr[1024];
int copied = MultiByteToWideChar(CP_ACP, 0, ansipath, -1, wstr, 1024);
if (copied > 0)
{
copied = WideCharToMultiByte(CP_UTF8, 0, wstr, -1, utfstr, 1024, NULL, NULL);
}
return copied > 0 ? utfstr : ansipath;
}
#endif