Blame SOURCES/0001-tdf-131069-always-produce-utf-8-from-gettext.patch

2a4ee2
From dc8db8308840516115a3f7cc9397a5c37bf99862 Mon Sep 17 00:00:00 2001
2a4ee2
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
2a4ee2
Date: Tue, 17 Mar 2020 20:14:17 +0000
2a4ee2
Subject: [PATCH] tdf#131069 always produce utf-8 from gettext
2a4ee2
2a4ee2
Change-Id: I311e647f08b4d541825e7790d971b98b5b5bfe40
2a4ee2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90631
2a4ee2
Tested-by: Jenkins
2a4ee2
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2a4ee2
---
2a4ee2
 unotools/source/i18n/resmgr.cxx | 3 +++
2a4ee2
 1 file changed, 3 insertions(+)
2a4ee2
2a4ee2
diff --git a/unotools/source/i18n/resmgr.cxx b/unotools/source/i18n/resmgr.cxx
2a4ee2
index 47069489aa41..786c83df2e7b 100644
2a4ee2
--- a/unotools/source/i18n/resmgr.cxx
2a4ee2
+++ b/unotools/source/i18n/resmgr.cxx
2a4ee2
@@ -130,7 +130,10 @@ namespace Translate
2a4ee2
         OString sPath(OUStringToOString(path, osl_getThreadTextEncoding()));
2a4ee2
         gen.add_messages_path(sPath.getStr());
2a4ee2
 #if defined UNX && !defined MACOSX && !defined IOS && !defined ANDROID
2a4ee2
+        // allow gettext to find these .mo files e.g. so gtk dialogs can use them
2a4ee2
         bindtextdomain(pPrefixName, sPath.getStr());
2a4ee2
+        // tdf#131069 gtk, and anything sane, always wants utf-8 strings as output
2a4ee2
+        bind_textdomain_codeset(pPrefixName, "UTF-8");
2a4ee2
 #endif
2a4ee2
         gen.add_messages_domain(pPrefixName);
2a4ee2
 
2a4ee2
-- 
2a4ee2
2.25.4
2a4ee2