Save the old locale (in case the application had set it).
authorPeter Verthez <Peter.Verthez@advalvas.be>
Tue, 15 Jan 2002 17:46:55 +0000 (17:46 +0000)
committerPeter Verthez <Peter.Verthez@advalvas.be>
Tue, 15 Jan 2002 17:46:55 +0000 (17:46 +0000)
gedcom/multilex.c

index 18992760f5883a230d9e0c6671bf21903874b86e..471f5ac37fed065a388799f7715662a5ac07777e 100644 (file)
@@ -111,9 +111,9 @@ int gedcom_parse_file(char* file_name)
   int result = 1;
   FILE* file;
   
+  char *save_locale  = setlocale(LC_ALL, NULL);
   char *save_textdom = textdomain(NULL);
-  setlocale(LC_ALL, "");   /* In fact only necessary if main program doesn't
-                             do this */
+  setlocale(LC_ALL, "");
   bindtextdomain(PACKAGE, LOCALEDIR);
   bind_textdomain_codeset(PACKAGE, INTERNAL_ENCODING);
   textdomain(PACKAGE);
@@ -139,6 +139,7 @@ int gedcom_parse_file(char* file_name)
   }
 
   textdomain(save_textdom);
+  setlocale(LC_ALL, save_locale);
   return result;
 }