From 1a518fa79de42145d640b58b07db90bcd23db2f9 Mon Sep 17 00:00:00 2001 From: Jean-Francois Dockes Date: Sun, 18 Nov 2012 13:07:11 +0100 Subject: [PATCH] call setlocale before rclconfig init --- src/common/rclinit.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/common/rclinit.cpp b/src/common/rclinit.cpp index 333c4424..491f1aa7 100644 --- a/src/common/rclinit.cpp +++ b/src/common/rclinit.cpp @@ -47,6 +47,10 @@ RclConfig *recollinit(RclInitFlags flags, // must check write() return values. signal(SIGPIPE, SIG_IGN); + // Make sure the locale is set. This is only for converting file names + // to utf8 for indexing. + setlocale(LC_CTYPE, ""); + // We would like to block SIGCHLD globally, but we can't because // QT uses it. Have to block it inside execmd.cpp @@ -102,10 +106,6 @@ RclConfig *recollinit(RclInitFlags flags, DebugLog::getdbl()->setloglevel(lev); } - // Make sure the locale is set. This is only for converting file names - // to utf8 for indexing. - setlocale(LC_CTYPE, ""); - // Make sure the locale charset is initialized (so that multiple // threads don't try to do it at once). config->getDefCharset();