http://redmine.audacious-media-player.org/http://redmine.audacious-media-player.org/welcome/favicon.ico?15159353402015-08-19T04:11:17ZRedmineAudacious - Bug #568: Absolute paths in M3U playlists are not converted from ISO-8859-1 on UTF-8 systemshttp://redmine.audacious-media-player.org/issues/568?journal_id=21482015-08-19T04:11:17ZJohn Lindgrenjohn@jlindgren.net
<ul></ul><p>Audacious has support for legacy character encodings out-of-the-box. You most likely have it misconfigured somehow. If we actually had no support for Latin-1 as you claim, people would have noticed years ago. Some questions you can answer to help us help you find the real problem:</p>
<p>1. What is the console output?<br />2. What are your character encoding settings? ISO-8859-1 should be there as a default; did you remove it?</p> Audacious - Bug #568: Absolute paths in M3U playlists are not converted from ISO-8859-1 on UTF-8 systemshttp://redmine.audacious-media-player.org/issues/568?journal_id=21492015-08-19T07:22:10ZLarry Hastingslarry@hastings.org
<ul></ul><p>Thank you for the quick reply!</p>
<p>You're right, Audacious does have support for legacy character encodings, and in many scenarios it works great. But there is a bug here--and I'm happy to report that after some experimentation I can be much more specific.</p>
<p>The bug:</p>
<blockquote>
<p>If an m3u playlist is encoded in latin-1, and an entry in that playlist is an <strong>absolute path</strong> containing non-ASCII characters, Audacious will fail to load that entry.</p>
</blockquote>
<p>The entry in the m3u playlist is:</p>
<blockquote>
<p>/home/media/flac/booster/Tangerine Dream - Booster/Ça Va - Ça Marche - Ça Ira Encore (Tangerine Dream).flac</p>
</blockquote>
<p>The error message printed to the console is:</p>
<blockquote>
<p>Cannot convert from locale (UTF-8): /home/media/flac/booster/Tangerine Dream - Booster/ Va - Marche - Ira Encore (Tangerine Dream).flac</p>
</blockquote>
Notes:
<ul>
<li>If I convert the m3u playlist into utf-8, Audacious loads the entry correctly.</li>
<li>If the entry in the m3u playlist is a <strong>relative</strong> path containing non-ASCII characters encoded in latin-1, Audacious loads the entry correctly.</li>
<li>If I drag the file into an empty playlist in Audacious, and export the playlist in m3u format, Audacious writes all entries as URL-encoded utf-8 file:/// URLs. Therefore the encoding of the file itself is ASCII, which prevents me from answering the question "what encoding does Audacious itself prefer".</li>
<li>For testing purposes, I renamed my "~/.config/audacious" directory to something else, so my configuration should be using all default settings.</li>
<li>I don't know specifically what "character encoding settings" you mean. But: if I click on the "Playlist" entry in the category list on the left side of the Settings dialog, the text field for "Fallback character encodings:" contains the entry "ISO-8859-1". (m3u playlists appear to be handled with a plugin, but the plugin does not furnish a Settings dialog.)</li>
</ul>
<p>Meanwhile, I'm happy to work around the problem by converting my m3u playlists to relative paths, which I prefer anyway. Or I could use .m3u8 files which are explicit about their correct encoding.</p> Audacious - Bug #568: Absolute paths in M3U playlists are not converted from ISO-8859-1 on UTF-8 systemshttp://redmine.audacious-media-player.org/issues/568?journal_id=21502015-08-19T21:28:01ZJohn Lindgrenjohn@jlindgren.net
<ul><li><strong>Subject</strong> changed from <i>audacious uses the wrong encoding when reading/writing M3U playlists</i> to <i>Absolute paths in M3U playlists are not converted from ISO-8859-1 on UTF-8 systems</i></li><li><strong>Category</strong> set to <i>plugins/m3u</i></li></ul><p>Hmm, for absolute paths, we do assume that they are in the local filename character encoding in use on the system (UTF-8 for most modern Linux systems). We could change this, but does it make sense to do so? I'm struggling to come up with a convincing use case. Using absolute paths means your M3U playlist is inherently non-portable, so your old Windows software isn't going to be able to read it anyway.</p>
<p>What software were you using to generate the M3U playlist in the first place? I'm curious why the developers of that software chose to convert the filenames to ISO-8859-1. Did they consider that they are limiting their potential audience to Western Europe and the Americas?</p> Audacious - Bug #568: Absolute paths in M3U playlists are not converted from ISO-8859-1 on UTF-8 systemshttp://redmine.audacious-media-player.org/issues/568?journal_id=21542015-08-21T07:14:43ZJohn Lindgrenjohn@jlindgren.net
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Closed</i></li><li><strong>Target version</strong> set to <i>3.7</i></li><li><strong>% Done</strong> changed from <i>0</i> to <i>100</i></li></ul><p>I pushed a fix for this Git master. If an Latin-1 absolute file name is used on a UTF-8 system, Audacious will first try opening the file name as-is. If that doesn't work, it will then try to convert the file name to UTF-8 (provided ISO-8859-1 is configured as a fallback encoding).</p>
<p>I've tried the following combinations:</p>
<table>
<tr>
<th>System locale</th>
<th>Path from M3U</th>
<th>fopen() attempts</th>
</tr>
<tr>
<td>Latin-1</td>
<td>Latin-1 (relative)</td>
<td>Latin-1, UTF-8</td>
</tr>
<tr>
<td>Latin-1</td>
<td>Latin-1 (absolute)</td>
<td>Latin-1, UTF-8</td>
</tr>
<tr>
<td>Latin-1</td>
<td>UTF-8 (relative)</td>
<td>Latin-1, UTF-8</td>
</tr>
<tr>
<td>Latin-1</td>
<td>UTF-8 (absolute)</td>
<td>Latin-1, UTF-8</td>
</tr>
<tr>
<td>UTF-8, Latin-1 fallback</td>
<td>Latin-1 (relative)</td>
<td>UTF-8</td>
</tr>
<tr>
<td>UTF-8, Latin-1 fallback</td>
<td>Latin-1 (absolute)</td>
<td>Latin-1, UTF-8</td>
</tr>
<tr>
<td>UTF-8, Latin-1 fallback</td>
<td>UTF-8 (relative)</td>
<td>UTF-8</td>
</tr>
<tr>
<td>UTF-8, Latin-1 fallback</td>
<td>UTF-8 (absolute)</td>
<td>UTF-8</td>
</tr>
<tr>
<td>UTF-8, no fallback</td>
<td>Latin-1 (relative)</td>
<td>none</td>
</tr>
<tr>
<td>UTF-8, no fallback</td>
<td>Latin-1 (absolute)</td>
<td>Latin-1</td>
</tr>
<tr>
<td>UTF-8, no fallback</td>
<td>UTF-8 (relative)</td>
<td>UTF-8</td>
</tr>
<tr>
<td>UTF-8, no fallback</td>
<td>UTF-8 (absolute)</td>
<td>UTF-8</td>
</tr>
</table>