summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAldrik Ramaekers <aldrikboy@gmail.com>2024-03-16 21:16:50 +0100
committerAldrik Ramaekers <aldrikboy@gmail.com>2024-03-16 21:16:50 +0100
commite3b0a2b87383eca950d38cbb0566983b00909f9c (patch)
treea67a64b76071edb111f24f198e193b1518ee3ce1 /src
parent868a1504930b086bfa171478029e9eccd81ea8cc (diff)
unix locale fix
Diffstat (limited to 'src')
-rw-r--r--src/unix/main_unix.cpp3
1 files changed, 2 insertions, 1 deletions
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++;
}