Skip to content

Commit 5ed1615

Browse files
committed
gpujpegtool: Windows: set console CP_UTF8
Not sure if required, it seems that sometimes it works without (yesterday when I tested) but accidently not today (not knowing what's different).
1 parent 2c0640f commit 5ed1615

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/main.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -424,6 +424,9 @@ wmain(int argc, wchar_t *argv[])
424424
main(int argc, char *argv[])
425425
#endif
426426
{
427+
#ifdef _WIN32
428+
SetConsoleOutputCP(CP_UTF8); // see also https://stackoverflow.com/questions/1660492/utf-8-output-on-windows-console
429+
#endif
427430

428431
printf("GPUJPEG rev %s built " __DATE__ " " __TIME__ " \n", GIT_REV);
429432

0 commit comments

Comments
 (0)