diff options
Diffstat (limited to 'src/common.c')
| -rw-r--r-- | src/common.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/common.c b/src/common.c index 4358945..e772a2f 100644 --- a/src/common.c +++ b/src/common.c @@ -80,7 +80,12 @@ bool nn_common_init(const char *thread_name) { if (thread_name) nn_thread_set_name(thread_name); + // https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/setlocale-wsetlocale?view=msvc-170#utf-8-support +#if defined NAUNET_ON_WINDOWS && !defined NAUNET_WIN32_COMPAT_MODE + if (!setlocale(LC_ALL, ".UTF8")) return false; +#else if (!setlocale(LC_ALL, "")) return false; +#endif al_set_print(al_print_default, NULL); |