summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2004-02-09 18:44:58 (UTC)
committer llornkcor <llornkcor>2004-02-09 18:44:58 (UTC)
commitda2559d959567db6a1501e62aa9b2c7c693cc074 (patch) (side-by-side diff)
treeccbacc2fbed3dab16b0da4c8d1524368d11e40f3
parent31fb2e7e1ea652abefc82febbc5739198fa6aaa7 (diff)
downloadopie-da2559d959567db6a1501e62aa9b2c7c693cc074.zip
opie-da2559d959567db6a1501e62aa9b2c7c693cc074.tar.gz
opie-da2559d959567db6a1501e62aa9b2c7c693cc074.tar.bz2
utf8 patch from Nikita V. Youshchenko <yoush@cs.msu.su>
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
@@ -68,4 +68,5 @@ void Om3u::readM3u() {
// qDebug("<<<<<<reading m3u "+f.name());
QTextStream t(&f);
+ t.setEncoding(QTextStream::UnicodeUTF8);
QString s;
while ( !t.atEnd() ) {
@@ -98,4 +99,5 @@ void Om3u::readM3u() {
void Om3u::readPls() { //it's a pls file
QTextStream t( &f );
+ t.setEncoding(QTextStream::UnicodeUTF8);
QString s;
while ( !t.atEnd() ) {
@@ -134,10 +136,11 @@ void Om3u::readPls() { //it's a pls file
void Om3u::write() { //writes list to m3u file
QString list;
+ 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() );
}
// f.close();
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
@@ -208,5 +208,5 @@ int Lib::play( const QString& fileName, int startPos, int start_time ) {
//xine_event_create_listener_thread (m_queue, xine_event_handler, this);
- 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
@@ -61,5 +61,6 @@ void Om3u::readM3u() {
// qDebug("<<<<<<reading m3u "+f.name());
QTextStream t(&f);
- QString s;
+ t.setEncoding(QTextStream::UnicodeUTF8);
+ QString s;
while ( !t.atEnd() ) {
s=t.readLine();
@@ -85,5 +86,6 @@ void Om3u::readM3u() {
void Om3u::readPls() { //it's a pls file
QTextStream t( &f );
- QString s;
+ t.setEncoding(QTextStream::UnicodeUTF8);
+ QString s;
while ( !t.atEnd() ) {
s = t.readLine();
@@ -122,10 +124,11 @@ void Om3u::readPls() { //it's a pls file
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() );
}
// f.close();