diff options
author | Mole Shang <[email protected]> | 2023-08-06 13:32:35 +0800 |
---|---|---|
committer | Mole Shang <[email protected]> | 2023-08-06 13:36:06 +0800 |
commit | 1ae17d1a63506421621e0e9e4a115bb22f9657db (patch) | |
tree | 5a959e7a1bccd9949922212820013cade2c48042 /src/main.c | |
parent | 5434e3e707c33b6fbd0f3d58b296c3232bba4847 (diff) | |
download | hinata-1ae17d1a63506421621e0e9e4a115bb22f9657db.tar.gz hinata-1ae17d1a63506421621e0e9e4a115bb22f9657db.tar.bz2 hinata-1ae17d1a63506421621e0e9e4a115bb22f9657db.zip |
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
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -1,6 +1,7 @@ #include <GL/glew.h> #include <GLFW/glfw3.h> #include <curl/curl.h> +#include <locale.h> #include <stdio.h> #include <stdlib.h> @@ -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(); |