Bug 15799 - When M3U playlists are written unicode characters in filenames are mangled
: When M3U playlists are written unicode characters in filenames are mangled
Status: CLOSED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Playlists
: 7.4.2
: PC Ubuntu Linux
: P2 major with 1 vote (vote)
: 7.6.0
Assigned To: Bradley D. Wall
: charset_issues
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-02-27 13:51 UTC by stridger
Modified: 2011-05-09 13:06 UTC (History)
1 user (show)

See Also:
Category: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description stridger 2010-02-27 13:51:44 UTC
I am using the newly released 7.4.2 on Ubuntu Karmic (and Jaunty). I have many files with unicode (non-ascii) characters in them. When those are added to the playlist everything works fine. However, when I save the playlist the actual path to the file is mangled, so that next time when the playlist is loaded, those files can't be found and are skipped. Besides it writing out wrong encoding, the filenames also seem to be trimmed.

More information on this can be found on http://forums.slimdevices.com/showthread.php?t=73865 .

I have found a solution which works for me, but I don't know whether it will work in general. The patch is below. It seems that the utf8decode function does something weird there, which causes things to break. It would be great if a solution could be found by either incorporating this patch or finding another solution. Without this playlists with songs that have non-unicode characters in their filepaths are unuseable, hence marked as major.

Thanks!

--- M3U.pm      2010-02-27 18:50:42.000000000 +0000
+++ M3U.pm      2010-02-27 18:51:16.000000000 +0000
@@ -234,7 +234,7 @@
                # XXX - we still have a problem where there can be decomposed
                # unicode characters. I don't know how this happens - it's
                # coming from the filesystem.
-               my $path = Slim::Utils::Unicode::utf8decode( $class->_pathForItem($track->url, 1) );
+               my $path = Slim::Utils::Unicode::utf8on( $class->_pathForItem($track->url, 1) );
 
                print $output "$path\n";
        }
Comment 1 Michael Herger 2010-02-27 22:25:22 UTC

*** This bug has been marked as a duplicate of bug 15739 ***
Comment 2 stridger 2010-02-28 04:01:07 UTC
(In reply to comment #1)
> *** This bug has been marked as a duplicate of bug 15739 ***

I have seen the other bug, but it seems to be different. It talks about scanning already existing playlists which are correctly written. This bug, however, is about creating playlists from Squeezebox server.
Comment 3 stridger 2010-02-28 04:02:29 UTC
I am reopening it again, but if you think that it is still the same issue, let me know.

Thank you.
Comment 4 SVN Bot 2011-01-26 02:39:50 UTC
 == Auto-comment from SVN commit #31842 to the slim repo by ayoung ==
 == http://svn.slimdevices.com/slim?view=revision&revision=31842 ==

Fixed bug 15799: When M3U playlists are written unicode characters in filenames are mangled
Comment 5 Paul Chandler 2011-05-09 13:06:53 UTC
Created playlists with non-ascii characters, was able to play back correctly