From ac4588566ff6a736e0e1d0b50bccab766b38527f Mon Sep 17 00:00:00 2001 From: Vladimir Zhbanov Date: Fri, 4 Oct 2013 09:26:31 +0400 Subject: [PATCH] gschem: convert output to current locale Current locale settings will be used to determine the output gschem encoding instead of using fixed UTF-8. --- gschem/src/gschem.c | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/gschem/src/gschem.c b/gschem/src/gschem.c index b5720ca..5e2dda2 100644 --- a/gschem/src/gschem.c +++ b/gschem/src/gschem.c @@ -41,6 +41,10 @@ #include #endif +#if ENABLE_NLS +#include +#endif + /* These are generated by parse_commandline() */ extern SCM s_pre_load_expr; extern SCM s_post_load_expr; @@ -352,7 +356,9 @@ int main (int argc, char *argv[]) setlocale(LC_NUMERIC, "C"); bindtextdomain("geda-gschem", LOCALEDIR); textdomain("geda-gschem"); - bind_textdomain_codeset("geda-gschem", "UTF-8"); + char *codeset = nl_langinfo(CODESET); + if (g_strcmp0(codeset,"") == 0) codeset="C"; + bind_textdomain_codeset("geda-gschem", codeset); #endif scm_boot_guile (argc, argv, main_prog, 0); -- 1.7.2.3