summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/multimedia/opieplayer/om3u.cpp7
-rw-r--r--noncore/multimedia/opieplayer2/lib.cpp2
-rw-r--r--noncore/multimedia/opieplayer2/om3u.cpp13
3 files changed, 14 insertions, 8 deletions
diff --git a/core/multimedia/opieplayer/om3u.cpp b/core/multimedia/opieplayer/om3u.cpp
index 8b92a8c..778eb22 100644
--- a/core/multimedia/opieplayer/om3u.cpp
+++ b/core/multimedia/opieplayer/om3u.cpp
@@ -69,2 +69,3 @@ void Om3u::readM3u() {
QTextStream t(&f);
+ t.setEncoding(QTextStream::UnicodeUTF8);
QString s;
@@ -99,2 +100,3 @@ void Om3u::readPls() { //it's a pls file
QTextStream t( &f );
+ t.setEncoding(QTextStream::UnicodeUTF8);
QString s;
@@ -135,2 +137,4 @@ void Om3u::write() { //writes list to m3u file
QString list;
+ QTextStream t(&f);
+ t.setEncoding(QTextStream::UnicodeUTF8);
if(count()>0) {
@@ -138,5 +142,4 @@ void Om3u::write() { //writes list to m3u file
// qDebug(*it);
- list += *it+"\n";
+ t << *it << "\n";
}
- f.writeBlock( list, list.length() );
}
diff --git a/noncore/multimedia/opieplayer2/lib.cpp b/noncore/multimedia/opieplayer2/lib.cpp
index 00cfa33..664ec65 100644
--- a/noncore/multimedia/opieplayer2/lib.cpp
+++ b/noncore/multimedia/opieplayer2/lib.cpp
@@ -209,3 +209,3 @@ int Lib::play( const QString& fileName, int startPos, int start_time ) {
- if ( !xine_open( m_stream, QFile::encodeName(str.utf8() ).data() ) ) {
+ if ( !xine_open( m_stream, str.utf8().data() ) ) {
return 0;
diff --git a/noncore/multimedia/opieplayer2/om3u.cpp b/noncore/multimedia/opieplayer2/om3u.cpp
index 7183fb4..69e87e7 100644
--- a/noncore/multimedia/opieplayer2/om3u.cpp
+++ b/noncore/multimedia/opieplayer2/om3u.cpp
@@ -62,3 +62,4 @@ void Om3u::readM3u() {
QTextStream t(&f);
- QString s;
+ t.setEncoding(QTextStream::UnicodeUTF8);
+ QString s;
while ( !t.atEnd() ) {
@@ -86,3 +87,4 @@ void Om3u::readPls() { //it's a pls file
QTextStream t( &f );
- QString s;
+ t.setEncoding(QTextStream::UnicodeUTF8);
+ QString s;
while ( !t.atEnd() ) {
@@ -123,8 +125,9 @@ void Om3u::write() { //writes list to m3u file
QString list;
- if(count()>0) {
+ QTextStream t(&f);
+ t.setEncoding(QTextStream::UnicodeUTF8);
+ if(count()>0) {
for ( QStringList::ConstIterator it = begin(); it != end(); ++it ) {
// qDebug(*it);
- list += *it+"\n";
+ t << *it << "\n";
}
- f.writeBlock( list, list.length() );
}