From 8d4c3ae8545d8569ae1f7c03e784922023cc007d Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=BCrgen=20Spitzm=C3=BCller?= Date: Sun, 10 Apr 2011 16:53:10 +0000 Subject: [PATCH] * Messages.cpp (get): - set again bind_textdomain_codeset before calling gettext. This works around the infamous bug #7371 MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Patch from Peter Kümmel. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@38325 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/support/Messages.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/support/Messages.cpp b/src/support/Messages.cpp index 58dcb729b3..17ba0c5696 100644 --- a/src/support/Messages.cpp +++ b/src/support/Messages.cpp @@ -165,6 +165,11 @@ docstring const Messages::get(string const & m) const #endif } + // FIXME: gettext sometimes "forgets" the ucs4_codeset we set + // in init(), which leads to severe message corruption (#7371) + // We set it again here unconditionally. A real fix must be found! + LASSERT(bind_textdomain_codeset(PACKAGE, ucs4_codeset), /**/); + char const * m_c = m.c_str(); char const * trans_c = gettext(m_c); docstring trans; -- 2.39.5