Version: (using KDE KDE 3.5.7) Installed from: Gentoo Packages Compiler: gcc 3.4.6 OS: Linux Amarok (v1.4.6) can not transfert files with UTF8 encoding characters to MTP device. MTP device used: Samsung YP-KJAB Tested features : Amarok can connect to the MTP device. Amarok can retrieve informations (folder structure and files) from MTP device. Amarok can transfert file with fully qualified path in standard ASCII. ** Amarok can not transfert file with accents in the fully qualified path (éàè...) While looking at the amarok trace (debug flag), the output from component [MtpMediaDevice] clearly shows characters differents then the file system representation : BEGIN: virtual MediaItem* MtpMediaDevice::copyTrackToDevice(const MetaBundle&) amarok: [MtpMediaDevice] filetype : 1 amarok: [MtpMediaDevice] Folder path : Jean Leloup - Le Dôme/ amarok: [MtpMediaDevice] Parent id : 536870937 amarok: [MtpMediaDevice] Sending track... /xx/xx/Jean Leloup/1996 - Le D?me/10 - Le D?me.mp3 Since the main folder of my music collection was in a folder with a non ascii chars, my MTP device was not usable with Amarok. I have created a quick and dirty patch to show how I temporary solved the problem by using UTF8 instead of QString latin conversion. Locale used: LANG=fr_CA.UTF-8 LC_CTYPE=fr_CA.UTF-8 LC_NUMERIC=fr_CA.UTF-8 LC_TIME=fr_CA.UTF-8 LC_COLLATE=fr_CA.UTF-8 LC_MONETARY=fr_CA.UTF-8 LC_MESSAGES=fr_CA.UTF-8 LC_PAPER=fr_CA.UTF-8 LC_NAME=fr_CA.UTF-8 LC_ADDRESS=fr_CA.UTF-8 LC_TELEPHONE=fr_CA.UTF-8 LC_MEASUREMENT=fr_CA.UTF-8 LC_IDENTIFICATION=fr_CA.UTF-8 LC_ALL= See attached patch.
Created attachment 20989 [details] patch to pinpoint the problem. Make use of utf8() instead of latin1().
Comment on attachment 20989 [details] patch to pinpoint the problem. Make use of utf8() instead of latin1(). >Index: amarok/src/mediadevice/mtp/mtpmediadevice.cpp >=================================================================== >--- amarok/src/mediadevice/mtp/mtpmediadevice.cpp (revision 681166) >+++ amarok/src/mediadevice/mtp/mtpmediadevice.cpp (working copy) >@@ -295,9 +295,9 @@ > debug() << "Parent id : " << parent_id << endl; > > m_critical_mutex.lock(); >- debug() << "Sending track... " << bundle.url().path().latin1() << endl; >+ debug() << "Sending track... " << bundle.url().path().utf8().data() << endl; > int ret = LIBMTP_Send_Track_From_File( >- m_device, bundle.url().path().latin1(), trackmeta, >+ m_device, bundle.url().path().utf8().data(), trackmeta, > progressCallback, this, parent_id > ); > m_critical_mutex.unlock();
I can confirm this issue with Suse 10.2 and Amarok 1.4.7
I can confirm this bug on debian sid and Amarok 1.4.8. LANG=fr_FR@euro LC_CTYPE="fr_FR@euro" LC_NUMERIC="fr_FR@euro" LC_TIME="fr_FR@euro" LC_COLLATE="fr_FR@euro" LC_MONETARY="fr_FR@euro" LC_MESSAGES="fr_FR@euro" LC_PAPER="fr_FR@euro" LC_NAME="fr_FR@euro" LC_ADDRESS="fr_FR@euro" LC_TELEPHONE="fr_FR@euro" LC_MEASUREMENT="fr_FR@euro" LC_IDENTIFICATION="fr_FR@euro" LC_ALL= All files with french specific character not supported in latin1 in song title are not transferred.
Alejandro can you please comment on this?
Copying UTF8 files works perfectly in 2.0, but will not fix retroactively, sorry.
Thanks Alejandro. Amarok 2 was all I wanted to know :)