mirror of
https://github.com/claunia/flac.git
synced 2025-12-16 18:54:26 +00:00
Metaflac UTF-8 fixes (Windows)
Metaflac can now print all console supported characters from tags on the screen. It also fixes metaflac to be able to import its own exports back without non-ascii characters getting mutilated. And --no-utf8-convert now works properly with import and export commands. Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
This commit is contained in:
committed by
Erik de Castro Lopo
parent
f6585b0bdc
commit
cc9f392166
@@ -203,7 +203,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) /* underflow check */
|
||||
@@ -224,7 +224,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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user