mirror of
https://invent.kde.org/graphics/okular
synced 2024-09-17 23:11:48 +00:00
Fix copying non-latin1 chars when xpdfrc does not exist.
svn path=/trunk/kdegraphics/kpdf/; revision=376506
This commit is contained in:
parent
d42321176a
commit
6589342bf5
|
@ -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")) {
|
||||
|
|
Loading…
Reference in a new issue