diff --git a/src/highlighters.cc b/src/highlighters.cc index 2bb08ec0..7c5db277 100644 --- a/src/highlighters.cc +++ b/src/highlighters.cc @@ -315,7 +315,7 @@ void expand_unprintable(const Window& window, DisplayBuffer& display_buffer) end = buffer.iterator_at(atom_it->content.end()); it != end; ++it) { Codepoint cp = *it; - if (cp != '\n' and not std::isprint((wchar_t)cp, std::locale())) + if (cp != '\n' and not isprint((int)cp)) { std::ostringstream oss; oss << "U+" << std::hex << cp; diff --git a/src/main.cc b/src/main.cc index 715489cf..ad41d843 100644 --- a/src/main.cc +++ b/src/main.cc @@ -171,7 +171,7 @@ int main(int argc, char* argv[]) { try { - std::locale::global(std::locale("")); + setlocale(LC_ALL, ""); signal(SIGSEGV, signal_handler); signal(SIGFPE, signal_handler);