Conduit does not work properly with UTF-8 locations for rhythmbox playlists

Bug #557393 reported by Fabio Rafael Rosa
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
conduit (Ubuntu)
Won't Fix
Undecided
Alexandre Rosenfeld

Bug Description

Binary package hint: conduit

When I try syncronizing and Rhythmbox playlist with something (an iPod in my case), it fails saying that the file does not exists.
My ubuntu is configured to pt_BR, so, my Music folder is Músicas .
The rhythmbox module fails to properly encode/decode the UTF-8 character from the folder name, as it shows the path location with garbage instead of the ú character.

I checked the source code for RhythmboxModule and debugged the problem, and it seems that the url2pathname method does not work properly if you use and unicode string as parameter.

I could fix the problem using the encode method from the unicode string before invoking url2pathname. Everything seems to work up to know.
I attaching a patch with the change I made

I'm using Lucid Lynx 10.04 up-to-date (conduit 0.3.17)

Tags: patch
Revision history for this message
Fabio Rafael Rosa (rafaelfdr) wrote :
tags: added: patch
Revision history for this message
Alexandre Rosenfeld (airmind) wrote :

An encode might work for your case, but it's not guaranteed to work. In fact, encoding 'Músicas' with encode() in my machine fails.
We might be able to work it out with encode('UTF-8'), as I don't think the url2pathname problem is with UTF-8 encoding, but with encodings other then UTF-8. Could you try with encode('UTF-8') and see if it works?

Changed in conduit (Ubuntu):
assignee: nobody → Alexandre Rosenfeld (airmind)
status: New → Confirmed
Revision history for this message
Fabio Rafael Rosa (rafaelfdr) wrote :

I tried encode("UTF-8") first, but it does not work (throws an exception)
What happens is that, the "location" string object, is already an unicode string object.
Try encoding M%C3%BAsicas and see if it work. That's how the url shows at rhythmbox playlist (and that's the way urllib encode after urllib.pathname2url('Músicas') )

Revision history for this message
Lukas Märdian (slyon) wrote :

"conduit" is not part of any supported version of Ubuntu anymore. So I'm cleaning this out as WONTFIX. Please re-open if you feel otherwise.

Changed in conduit (Ubuntu):
status: Confirmed → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Patches

Remote bug watches

Bug watches keep track of this bug in other bug trackers.