http://bugzilla.lyx.org/show_bug.cgi?id=3793

This crash only happens when you use a language that has non-ascii chars in a 
message (such as fr_FR: "Table des Matières" in the reported case)

The fix seems straightforward to me.

OK to apply?

Jürgen
Index: src/Messages.cpp
===================================================================
--- src/Messages.cpp	(Revision 18639)
+++ src/Messages.cpp	(Arbeitskopie)
@@ -153,9 +153,9 @@
 		// return what we got in.
 		boost::smatch sub;
 		if (regex_match(m, sub, reg))
-			translated = from_ascii(sub.str(1));
+			translated = from_utf8(sub.str(1));
 		else
-			translated = from_ascii(tmp);
+			translated = from_utf8(tmp);
 	} else {
 		LYXERR(Debug::DEBUG) << "We got a translation" << endl;
 		char_type const * ucs4 = reinterpret_cast<char_type const *>(msg);

Reply via email to