[polari/wip/carlosg/tracker: 429/445] log-tool: Set locale




commit c6368e29c1d3f4574395dab5a7bddb37d8b8d58d
Author: Carlos Garnacho <carlosg gnome org>
Date:   Sun Feb 24 22:53:13 2019 +0100

    log-tool: Set locale
    
    This will ensure FTS is properly setup for import, and eliminates
    the need to regenerate it from scratch (due to the locale change)
    when running the real thing later on.

 src/polari-log-tool.c | 4 ++++
 1 file changed, 4 insertions(+)
---
diff --git a/src/polari-log-tool.c b/src/polari-log-tool.c
index ee80cb74..c33dc0a0 100644
--- a/src/polari-log-tool.c
+++ b/src/polari-log-tool.c
@@ -16,6 +16,8 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include <locale.h>
+
 #include "lib/polari-tpl-importer.h"
 #include "lib/polari-message.h"
 #include "lib/polari-util.h"
@@ -244,6 +246,8 @@ main (int   argc,
 {
   const char *command;
 
+  setlocale (LC_ALL, "");
+
   g_set_prgname ("polari-log-tool");
   g_set_application_name ("Polari Log Tool");
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]