From a7376741acc7571dcea1f8502c2826b8a8069784 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Spitzm=C3=BCller?= Date: Sun, 10 Apr 2011 17:08:08 +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=UTF-8 Content-Transfer-Encoding: 8bit Patch from Peter Kümmel. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@38326 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/support/Messages.cpp | 5 +++++ status.16x | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/src/support/Messages.cpp b/src/support/Messages.cpp index 096485335f..39ea1f2ae5 100644 --- a/src/support/Messages.cpp +++ b/src/support/Messages.cpp @@ -154,6 +154,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; diff --git a/status.16x b/status.16x index 64bddd39b3..fe0ef5dd57 100644 --- a/status.16x +++ b/status.16x @@ -62,6 +62,10 @@ What's new * USER INTERFACE +- Fix corruption of localized messages while changing color preferences, + which could result in a non-functional lyx instance, an assertion and + dataloss (bug 7371). + - Fix a crash when editing the name of an unknown math macro with an argument which is immediately followed by another unknown math macro (bug 7316).