summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2020-03-17 20:14:17 +0000
committerAdolfo Jayme Barrientos <fitojb@ubuntu.com>2020-03-18 14:01:01 +0100
commitdc8db8308840516115a3f7cc9397a5c37bf99862 (patch)
treea2f641716220d2d977a99c1221a1b74e34f9f0c3
parenta691ca9fe5d31146424cc82d5828dbb803a3b1da (diff)
tdf#131069 always produce utf-8 from gettext
Change-Id: I311e647f08b4d541825e7790d971b98b5b5bfe40 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90631 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
-rw-r--r--unotools/source/i18n/resmgr.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/unotools/source/i18n/resmgr.cxx b/unotools/source/i18n/resmgr.cxx
index 47069489aa41..786c83df2e7b 100644
--- a/unotools/source/i18n/resmgr.cxx
+++ b/unotools/source/i18n/resmgr.cxx
@@ -130,7 +130,10 @@ namespace Translate
OString sPath(OUStringToOString(path, osl_getThreadTextEncoding()));
gen.add_messages_path(sPath.getStr());
#if defined UNX && !defined MACOSX && !defined IOS && !defined ANDROID
+ // allow gettext to find these .mo files e.g. so gtk dialogs can use them
bindtextdomain(pPrefixName, sPath.getStr());
+ // tdf#131069 gtk, and anything sane, always wants utf-8 strings as output
+ bind_textdomain_codeset(pPrefixName, "UTF-8");
#endif
gen.add_messages_domain(pPrefixName);