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

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 ...@@ -107,7 +107,7 @@ const QString KPDFPage::getTextInRect( const QRect & rect, double zoom ) const
right = (int)((double)rect.right() / zoom), right = (int)((double)rect.right() / zoom),
bottom = (int)((double)rect.bottom() / zoom); bottom = (int)((double)rect.bottom() / zoom);
GString * text = m_text->getText( left, top, right, bottom ); 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) { ...@@ -221,7 +221,7 @@ GlobalParams::GlobalParams(const char *cfgFileName) {
psEmbedCIDTrueType = gTrue; psEmbedCIDTrueType = gTrue;
psOPI = gFalse; psOPI = gFalse;
psASCIIHex = gFalse; psASCIIHex = gFalse;
textEncoding = new GString("Latin1"); textEncoding = new GString("UTF-8");
#if defined(WIN32) #if defined(WIN32)
textEOL = eolDOS; textEOL = eolDOS;
#elif defined(MACOS) #elif defined(MACOS)
...@@ -425,8 +425,9 @@ void GlobalParams::parseFile(GString *fileName, FILE *f) { ...@@ -425,8 +425,9 @@ void GlobalParams::parseFile(GString *fileName, FILE *f) {
parseYesNo("psOPI", &psOPI, tokens, fileName, line); parseYesNo("psOPI", &psOPI, tokens, fileName, line);
} else if (!cmd->cmp("psASCIIHex")) { } else if (!cmd->cmp("psASCIIHex")) {
parseYesNo("psASCIIHex", &psASCIIHex, tokens, fileName, line); parseYesNo("psASCIIHex", &psASCIIHex, tokens, fileName, line);
} else if (!cmd->cmp("textEncoding")) { // Always use UTF-8 and allow QString do the magic
parseTextEncoding(tokens, fileName, line); // } else if (!cmd->cmp("textEncoding")) {
// parseTextEncoding(tokens, fileName, line);
} else if (!cmd->cmp("textEOL")) { } else if (!cmd->cmp("textEOL")) {
parseTextEOL(tokens, fileName, line); parseTextEOL(tokens, fileName, line);
} else if (!cmd->cmp("textPageBreaks")) { } 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