Another encoding fix

This commit is contained in:
Christophe Dumez
2011-02-10 19:01:06 +00:00
parent e66a956596
commit cc53b5bb15

View File

@@ -2523,7 +2523,7 @@ void QBtSession::saveDHTEntry() {
const QString dht_path = misc::cacheLocation()+QDir::separator()+QString::fromUtf8("dht_state"); const QString dht_path = misc::cacheLocation()+QDir::separator()+QString::fromUtf8("dht_state");
if(QFile::exists(dht_path)) if(QFile::exists(dht_path))
misc::safeRemove(dht_path); misc::safeRemove(dht_path);
boost::filesystem::ofstream out(dht_path.toUtf8().constData(), std::ios_base::binary); boost::filesystem::ofstream out(dht_path.toLocal8Bit().constData(), std::ios_base::binary);
out.unsetf(std::ios_base::skipws); out.unsetf(std::ios_base::skipws);
bencode(std::ostream_iterator<char>(out), dht_state); bencode(std::ostream_iterator<char>(out), dht_state);
qDebug("DHT entry saved"); qDebug("DHT entry saved");