[gtk+] Make non-ASCII strings in ui files work



commit b3d90fe51bb83b61b39e75ed513683ca00483d8b
Author: Matthias Clasen <mclasen redhat com>
Date:   Thu Oct 2 21:28:43 2014 -0400

    Make non-ASCII strings in ui files work
    
    Our extractor tool was not calling setlocale(), thus it only
    produced output in the C locale, ie ASCII. Oops.

 util/extract-strings.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/util/extract-strings.c b/util/extract-strings.c
index 183b99a..5dd379e 100644
--- a/util/extract-strings.c
+++ b/util/extract-strings.c
@@ -15,6 +15,7 @@
  * License along with this library. If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include <locale.h>
 #include <glib.h>
 
 typedef struct {
@@ -143,6 +144,8 @@ main (int argc, char *argv[])
   GMarkupParseContext *context;
   ParserData data;
 
+  setlocale (LC_ALL, "");
+
   if (argc < 2)
     {
       g_printerr ("Expect a filename\n");


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