2 bug fixes (by AsamK) to make rscollection files compatible with utf8

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4701 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2011-11-30 19:24:17 +00:00
parent 0d118c7033
commit e62008d493
2 changed files with 4 additions and 3 deletions

View File

@ -184,6 +184,7 @@ bool RsCollectionFile::save(const QString& filename) const
}
QTextStream stream(&file) ;
stream.setCodec("UTF-8") ;
stream << _xml_doc.toString() ;

View File

@ -29,9 +29,9 @@ bool RsUrlHandler::openUrl(const QUrl& url)
{
if(url.scheme() == QString("file") && url.toLocalFile().endsWith("."+RsCollectionFile::ExtensionString))
{
RsCollectionFile Collection;
if (Collection.load(url.toLocalFile().toUtf8().constData())) {
Collection.downloadFiles() ;
try
{
RsCollectionFile(url.toLocalFile()).downloadFiles() ;
}
return true;
}