Commit d5b241f4 authored by ivo's avatar ivo

Improve Unicode behavior in Windows. Replaces GetConsoleCP() by CP_ACP as...

Improve Unicode behavior in Windows.  Replaces GetConsoleCP() by CP_ACP as according to Peter Harris, "Current Visual Studio libraries assume CP_ACP for all output, regardless of the console code page."

svn path=/trunk/vorbis-tools/; revision=15093
parent ea2ef4c9
......@@ -186,7 +186,7 @@ int utf8_decode(const char *from, char **to)
return -1;
}
chars = WideCharToMultiByte(GetConsoleCP(), WC_COMPOSITECHECK, unicode,
chars = WideCharToMultiByte(CP_ACP, WC_COMPOSITECHECK, unicode,
-1, NULL, 0, NULL, NULL);
if(chars == 0)
......@@ -204,7 +204,7 @@ int utf8_decode(const char *from, char **to)
return -1;
}
err = WideCharToMultiByte(GetConsoleCP(), WC_COMPOSITECHECK, unicode,
err = WideCharToMultiByte(CP_ACP, WC_COMPOSITECHECK, unicode,
-1, *to, chars, NULL, NULL);
if(err != chars)
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment