diff --git a/src/linguist/linguist/sourcecodeview.cpp b/src/linguist/linguist/sourcecodeview.cpp
index aead2076e96a72378640830ad0a4078cbffc3f06..a5cf23f1d167457eb8594ff3ce1782a077892f4e 100644
--- a/src/linguist/linguist/sourcecodeview.cpp
+++ b/src/linguist/linguist/sourcecodeview.cpp
@@ -108,7 +108,7 @@ void SourceCodeView::showSourceCode(const QString &absFileName, const int lineNu
             appendHtml(tr("<i>File %1 not readable</i>").arg(absFileName));
             return;
         }
-        fileText = QString::fromLatin1(file.readAll());
+        fileText = QString::fromUtf8(file.readAll());
         fileHash.insert(absFileName, fileText);
     }