From: Peter Verthez Date: Tue, 15 Jan 2002 17:46:55 +0000 (+0000) Subject: Save the old locale (in case the application had set it). X-Git-Url: https://git.dlugolecki.net.pl/?a=commitdiff_plain;h=4b1ca54bb8119fa013d5e4deeed10b6428e69594;p=gedcom-parse.git Save the old locale (in case the application had set it). --- diff --git a/gedcom/multilex.c b/gedcom/multilex.c index 1899276..471f5ac 100644 --- a/gedcom/multilex.c +++ b/gedcom/multilex.c @@ -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; }