Commit 6589342b authored by Jakub Stachowski's avatar Jakub Stachowski

Fix copying non-latin1 chars when xpdfrc does not exist.

svn path=/trunk/kdegraphics/kpdf/; revision=376506
parent d4232117
......@@ -107,7 +107,7 @@ const QString KPDFPage::getTextInRect( const QRect & rect, double zoom ) const
right = (int)((double)rect.right() / zoom),
bottom = (int)((double)rect.bottom() / zoom);
GString * text = m_text->getText( left, top, right, bottom );
return QString( text->getCString() );
return QString::fromUtf8( text->getCString() );
}
......
......@@ -221,7 +221,7 @@ GlobalParams::GlobalParams(const char *cfgFileName) {
psEmbedCIDTrueType = gTrue;
psOPI = gFalse;
psASCIIHex = gFalse;
textEncoding = new GString("Latin1");
textEncoding = new GString("UTF-8");
#if defined(WIN32)
textEOL = eolDOS;
#elif defined(MACOS)
......@@ -425,8 +425,9 @@ void GlobalParams::parseFile(GString *fileName, FILE *f) {
parseYesNo("psOPI", &psOPI, tokens, fileName, line);
} else if (!cmd->cmp("psASCIIHex")) {
parseYesNo("psASCIIHex", &psASCIIHex, tokens, fileName, line);
} else if (!cmd->cmp("textEncoding")) {
parseTextEncoding(tokens, fileName, line);
// Always use UTF-8 and allow QString do the magic
// } else if (!cmd->cmp("textEncoding")) {
// parseTextEncoding(tokens, fileName, line);
} else if (!cmd->cmp("textEOL")) {
parseTextEOL(tokens, fileName, line);
} else if (!cmd->cmp("textPageBreaks")) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment