From c1b2f7ef6aa0b4f164a5b56051a12fcc503ebdaa Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Tue, 2 Jul 2013 14:02:52 +0100 Subject: [PATCH] use C locale function instead of C++ ones --- src/highlighters.cc | 2 +- src/main.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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);