URL-encoding issue in the Xine backend

Alex Merry kde at randomguy3.me.uk
Sat Sep 27 02:20:24 CEST 2008


I'm not sure if this is the right place to send this, so apologies if not.

Amarok currently has an issue on systems with non-UTF-8 locales.  If Amarok 
enqueues a KUrl pointing to a file that has a non-ascii character in the name 
(for example, 
"file:///home/music/Les_Misérables/CD2_12_Empty_Chairs_at_Empty_Tables.ogg"), 
it sometimes fails.  This seems to depend on whether the URL is passed 
directly to Xine or the file is loaded via KIO (I have no idea how the method 
used is chosen, but it seems to be consistent for any given run of Amarok, and 
may have something (either directly or not) to do with environment variables 
since it seems to use KIO when I run it from Konsole, but not when I run it 
from Kickoff).

If it is passed to Xine, we get this output:

amarok: [EngineController] Enqueuing 
KUrl("file:///home/music/Les_Misérables/CD2_12_Empty_Chairs_at_Empty_Table 
s.ogg")
################################ Event: GaplessSwitch GaplessSwitch new m_mrl 
= 
file:///home/music/Les_Mis%C3%A9rables/CD2_12_Empty_Chairs_at_Empty_Tables.ogg 
XINE_EVENT_UI_MESSAGE xine_open for gapless playback failed! 

(It works when done via KIO).

What I think is happening is that the URL is being created from Unicode data, 
then QUrl converts it to UTF-8 before %-encoding it.  The %-encoded version is 
passed to Xine, which I guess then tries to open the file using the UTF-8 
encoding.  This won't work on systems where the locale is not UTF-8.

I'm not sure who's at fault here, though.  Should Amarok be passing a QUrl 
that represents the local 8 bit encoding of the filename rather than the 
Unicode version?  Or should Phonon force the correct encoding?  Or should Xine 
be recoding the %-encoding of the UTF-8 encoding into the local 8 bit 
encoding?

Thanks

Alex


-- 
Proud KDE hacker: http://www.kde.org
Get KDE 4.1 - out now!

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/phonon-backends/attachments/20080927/32a0491a/attachment.sig 


More information about the Phonon-backends mailing list