|
Hi!
I have some MP3s with national characters in filenames, and Amarok refuses to play them. When Amarok is not running and i run [code:1]amarok song.mp3[/code:1] Amarok starts and begins to play even if song.mp3 has some national characters in filename. But it don\'t work when Amarok is already running (it says the file does not exist and it\'s filename is garbled). And i have Amarok always running, I can\'t live without it B) When I select the song in Collection, it also plays fine. I found out that when i run [code:1]dcop amarok playlist playMedia song.mp3[/code:1] it works OK (even with national characters), so maybe the problem is in communication between amarok and amarokapp. I\'m using Amarok 1.2.3, Arts engine and UTF8 filesystem. Thanks for all suggestions. |
KDE Developer
|
Yes, it doesn\'t have to do with characters. You currently have to do:
[code:1] amarok `pwd`/file.mp3[/code:1] Post edited by: eean, at: 2005/05/21 18:15
Amarok Developer
|
|
I also found this (it uses directory from where Amarok was started when no path is given). But when there are national characters in filename, it won\'t open the file even when full path is given. And the name in playlist seems like it is displayed in ISO8859-1.
|
|
I (hopefully) found a solution, the problem was that arguments were taken directly from command line (in UTF8 as it was ASCII), but Qt converted them again to UTF8 when they were passed to dcop. I added a conversion from UTF8, I hope it won\'t break non-unicode locales.
Here\'s the patch (i had to fight with BBCode to insert [i]): [code:1]diff -ur amarok-1.2.4/amarok/src/loader/loader.cpp amarok-1.2.4-utf8/amarok/src/loader/loader.cpp --- amarok-1.2.4/amarok/src/loader/loader.cpp 2005-05-19 19:00:19.000000000 +0200 +++ amarok-1.2.4-utf8/amarok/src/loader/loader.cpp 2005-05-21 18:16:55.000000000 +0200 @@ -36,7 +36,7 @@ //NOTE this list doesn\'t include argv[0] (\"amarok\"«») QStringList args; for( int i = 1; i < argc; i++ ) - args += argv[i]; + args += QString::fromLocal8Bit(argv[i]); const bool isRunning = amarokIsRunning();[/code:1] |
|
In preview the patch looked OK, but now it\'s broken
I uploaded it to http://8an.praha12.net/storage/amarok-utf8.diff |
|
In preview the patch looked OK, but now it\'s broken
I uploaded it to http://8an.praha12.net/storage/amarok-utf8.diff |
Registered users: Bing [Bot], Google [Bot], q.ignora, watchstar