From e3b0a2b87383eca950d38cbb0566983b00909f9c Mon Sep 17 00:00:00 2001 From: Aldrik Ramaekers Date: Sat, 16 Mar 2024 21:16:50 +0100 Subject: unix locale fix --- src/unix/main_unix.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/unix/main_unix.cpp b/src/unix/main_unix.cpp index c291ee5..823c66d 100644 --- a/src/unix/main_unix.cpp +++ b/src/unix/main_unix.cpp @@ -74,7 +74,7 @@ static void drop_callback(GLFWwindow* window, int count, const char** paths) ts_font_range _ts_get_font_range_to_load() { wchar_t buffer[50] = {0}; - char* ll = setlocale(LC_ALL, NULL); + char* ll = setlocale(LC_CTYPE, NULL); mbstowcs (buffer, ll, 50); wchar_t* iter = buffer; @@ -82,6 +82,7 @@ ts_font_range _ts_get_font_range_to_load() { if (*iter == ' ') *iter = 0; if (*iter == '.') *iter = 0; if (*iter == '@') *iter = 0; + if (*iter == '_') *iter = '-'; iter++; } -- cgit v1.2.3-70-g09d2