Skip to content

Commit

Permalink
Fix an issue with UTF8 in Qt5
Browse files Browse the repository at this point in the history
  • Loading branch information
Isarhamster committed Sep 5, 2024
1 parent d370783 commit 02a3d3d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions chessx.pro
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ unix|!macx {

binfiles.files = release/chessx
binfiles.path = $$BINDIR

# Note: Compile SSL 1.1.1, uncomment the following line and put the lib path here
# LIBS += -L/home/parallels/openssl-1.1.1q -lcrypto -lssl
}

scid {
Expand Down
3 changes: 3 additions & 0 deletions src/database/pgndatabase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1075,6 +1075,9 @@ void PgnDatabase::prepareNextLine()
if(m_utf8)
{
QTextStream textStream(m_lineBuffer);
#if QT_VERSION < 0x060000
textStream.setCodec("UTF-8");
#endif
m_currentLine = textStream.readLine().simplified();
}
else
Expand Down

0 comments on commit 02a3d3d

Please sign in to comment.