fix character corruption

Add setlocale
This commit is contained in:
Nekokabu 2015-10-03 13:35:27 +09:00
parent f028d40910
commit 118134766c
1 changed files with 5 additions and 0 deletions

View File

@ -198,6 +198,11 @@ int WINAPI WinMain(HINSTANCE /*hInstance*/, HINSTANCE /*hPrevInstance*/, LPSTR /
{
FixDirectories();
char *lbuffer = new char[10];
if (GetLocaleInfoA(LOCALE_SYSTEM_DEFAULT, LOCALE_SABBREVLANGNAME, lbuffer, 10))
setlocale(LC_ALL, lbuffer);
delete lbuffer;
CoInitialize(NULL);
try
{