From 8396208c0025f847a8b9e8ea417a5ea029df7b8d Mon Sep 17 00:00:00 2001 From: staviq Date: Fri, 20 Oct 2023 05:15:40 +0200 Subject: [PATCH] remove redundant C locale check --- common/console.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/console.cpp b/common/console.cpp index 932131f4f..c4dd27c37 100644 --- a/common/console.cpp +++ b/common/console.cpp @@ -114,9 +114,9 @@ namespace console { auto locale = setlocale(LC_ALL, ""); - if (locale == nullptr || !strcmp(locale, "C") || strcasestr(locale, "utf-8") == nullptr) { + if (locale == nullptr || strcasestr(locale, "utf-8") == nullptr) { auto lang = getenv("LANG"); - if (lang != nullptr && strcmp(lang, "C") && strcasestr(lang, "utf-8") != nullptr) { + if (lang != nullptr && strcasestr(lang, "utf-8") != nullptr) { setlocale(LC_ALL, lang); } else { setlocale(LC_ALL, "C.UTF-8");