summaryrefslogtreecommitdiff
path: root/quacker/lister.cpp
diff options
context:
space:
mode:
authorJohn Fultz <jfultz@wolfram.com>2016-01-15 12:50:29 -0600
committerJohn Fultz <jfultz@wolfram.com>2016-01-15 12:50:44 -0600
commit9da3b038985650bf1f16409abd0a0a7f35de5a62 (patch)
tree141cd8f37afc286e98c1ac7ff46d3c4a320318a8 /quacker/lister.cpp
parent162cd748627bd36a5390143a6df75a5b8fc4436c (diff)
Yet more places with bad streaming encoding.
Okay...I think this fixes all file streams to be UTF-8 except for GCGs, which require less trivial effort.
Diffstat (limited to 'quacker/lister.cpp')
-rw-r--r--quacker/lister.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/quacker/lister.cpp b/quacker/lister.cpp
index be3e335..08e2405 100644
--- a/quacker/lister.cpp
+++ b/quacker/lister.cpp
@@ -233,6 +233,7 @@ void ListerDialog::openFile()
if (file.open(QIODevice::ReadOnly | QIODevice::Text))
{
QTextStream stream(&file);
+ stream.setCodec(QTextCodec::codecForName("UTF-8"));
QString line;
while (!stream.atEnd())
{
@@ -430,6 +431,7 @@ QString ListerDialog::writeList(bool alphagrams)
}
QTextStream stream(&file);
+ stream.setCodec(QTextCodec::codecForName("UTF-8"));
QMap<QString, Dict::WordList> map(anagramMap());