r20677 by jghali -
scribus-commit
scribus-commit at lists.scribus.net
Tue Jan 12 20:08:48 UTC 2016
Author: jghali
Date: Tue Jan 12 20:08:48 2016
New Revision: 20677
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=20677
Log:
fix codec selection issue in rtf importer (might also fix #13636)
Modified:
trunk/Scribus/scribus/third_party/rtf-qt/sladocumentrtfoutput.cpp
Modified: trunk/Scribus/scribus/third_party/rtf-qt/sladocumentrtfoutput.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20677&path=/trunk/Scribus/scribus/third_party/rtf-qt/sladocumentrtfoutput.cpp
==============================================================================
--- trunk/Scribus/scribus/third_party/rtf-qt/sladocumentrtfoutput.cpp (original)
+++ trunk/Scribus/scribus/third_party/rtf-qt/sladocumentrtfoutput.cpp Tue Jan 12 20:08:48 2016
@@ -47,7 +47,7 @@
m_fontTable.clear();
m_fontTableReal.clear();
m_codecList = QTextCodec::availableCodecs();
- if (m_codecList.contains("cp1252"))
+ if (m_codecList.contains("cp1252") || m_codecList.contains("CP1252"))
m_codec = QTextCodec::codecForName("cp1252"); // Default ANSI codec
else
m_codec = QTextCodec::codecForLocale();
@@ -65,9 +65,9 @@
QByteArray ba;
ba.setNum(enc);
QByteArray encTest = "cp" + ba;
- if (m_codecList.contains(encTest))
+ if (m_codecList.contains(encTest) || m_codecList.contains(encTest.toUpper()))
m_codec = QTextCodec::codecForName(encTest);
- else
+ else if (m_codecList.contains("cp1252") || m_codecList.contains("CP1252"))
m_codec = QTextCodec::codecForName("cp1252");
}
More information about the scribus-commit
mailing list