From 1ae17d1a63506421621e0e9e4a115bb22f9657db Mon Sep 17 00:00:00 2001 From: Mole Shang <135e2@135e2.dev> Date: Sun, 6 Aug 2023 13:32:35 +0800 Subject: hinata: set locale to UTF-8 by default Enable UTF-8 mode on Windows to avoid filename encoding issues. Ref: https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/setlocale-wsetlocale?view=msvc-170#utf-8-support --- src/main.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/main.c b/src/main.c index 4306b87..e9d22f1 100644 --- a/src/main.c +++ b/src/main.c @@ -1,6 +1,7 @@ #include #include #include +#include #include #include @@ -36,6 +37,9 @@ static void error_callback(int e, const char *d) { int main(void) { struct ui_struct ui; + /* Set locale*/ + setlocale(LC_ALL, ".UTF-8"); + /* Curl */ curl_init(); -- cgit v1.2.3