On Sep 20, 2005, at 10:43 AM, Andreas Vox wrote:
Hm... did the patch succeed at all or was it rejected? Gmane isn't
nice to
patches.
It was rejected, but I applied by hand. Same with this new one:
patching file src/frontends/qt2/QLyXKeySym.C
Hunk #1 FAILED at 54.
patch unexpectedly ends in middle of line
Hunk #2 FAILED at 94.
2 out of 2 hunks FAILED -- saving rejects to file src/frontends/
qt2/QLyXKeySym.C.rej
Anyway, the patch below succeeds in fixing the crash.
Bennett
Well, then that one (applied against cvs version):
Index: src/frontends/qt2/QLyXKeySym.C
==================================
RCS file: /var/cvs/lyx/lyx-devel/src/frontends/qt2/QLyXKeySym.C,v
retrieving revision 1.34
diff -u -p -r1.34 QLyXKeySym.C
--- src/frontends/qt2/QLyXKeySym.C 17 Jul 2005 11:58:54
-0000 1.34
+++ src/frontends/qt2/QLyXKeySym.C 20 Sep 2005 14:41:39 -0000
@@ -54,9 +54,10 @@ char const encode(string const & encodin
}
if (lyxerr.debugging())
- lyxerr[Debug::KEY] << "Using codec " << fromqstr(codec->name())
<< endl;
+ lyxerr[Debug::KEY] << "Using codec " <<
+ (codec? fromqstr(codec->name()) : "NULL")
<< endl;
- if (!codec->canEncode(str)) {
+ if (!codec || !codec->canEncode(str)) {
if (lyxerr.debugging())
lyxerr[Debug::KEY] << "Oof. Can't encode
the text !" << endl;
return 0;
@@ -93,6 +94,7 @@ void initEncodings()
string::size_type i = s.find(".");
s = s.substr(0, i);
+ encoding_map["C"] = QTextCodec::codecForName("Latin-1");
encoding_map["iso8859-1"] = QTextCodec::codecForName("ISO
8859-1");
encoding_map["iso8859-2"] = QTextCodec::codecForName("ISO
8859-2");
encoding_map["iso8859-3"] = QTextCodec::codecForName("ISO
8859-3");