Browse Source

Use UTF-8 codepage on Windows

Portability goes brrr

Signed-off-by: wmb <wmb@teknik.io>
tags/v0.1.0
wmb 5 months ago
parent
commit
1d045a6407
1 changed files with 8 additions and 0 deletions
  1. 8
    0
      main.c

+ 8
- 0
main.c View File

@@ -8,6 +8,10 @@

#include <unistd.h>

#ifdef _WIN32
# include <windows.h>
#endif /* _WIN32 */

#include "benchmark-data.h"


@@ -42,6 +46,10 @@ int main(int argc, char *argv[])
int i;
double f0, inter, intra;;

#ifdef _WIN32
SetConsoleOutputCP(CP_UTF8);
#endif /* _WIN32 */

while ((c = getopt(argc, argv, ":c:i:h")) != -1) {
int k;
switch (c) {

Loading…
Cancel
Save