Bug 507329 - how to save playlists in UTF8 format using Amarok?
Summary: how to save playlists in UTF8 format using Amarok?
Status: RESOLVED FIXED
Alias: None
Product: amarok
Classification: Applications
Component: Collections/Local (other bugs)
Version First Reported In: 2.9.71
Platform: openSUSE Linux
: NOR wishlist
Target Milestone: kf5
Assignee: Amarok Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-07-21 19:25 UTC by Gara anlio
Modified: 2025-08-03 15:12 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
Comparison of old and new playlists (1.44 KB, audio/x-mpegurl)
2025-07-21 19:25 UTC, Gara anlio
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gara anlio 2025-07-21 19:25:50 UTC
Created attachment 183404 [details]
Comparison of old and new playlists

Until 10 years ago, we could save playlists (.m3u) in UTF8 format using the Amorok application.
The M3U files could be read even on older smartphones or by other applications.
Now I can no longer save the playlist in UTF8 (m3U or m3u8) format with Amarok.
Could you please explain how to save playlists in UTF8 format?
Thank you in advance for your efforts.
Comment 1 Tuomas Nurmi 2025-07-21 21:15:57 UTC
Thank you for the report! Apparently there are at least three different ways to export a playlist. Menubar -> Playlist -> Export, and Playlist view statusbar -> Floppy disk icon -> Export playlist behave better.
I guess the one you attached is exported from Playlist browser on left side of the screen -> Right click a playlist -> Export as - I'm getting similar results from there, too. 

Pretty small fix will be enough, but needs some thinking through, as playlist files and paths are surprisingly complicated to get right in every case...
Comment 2 Tuomas Nurmi 2025-07-21 22:18:41 UTC
Just noting here that e.g. vlc seems to escape all spaces with %20, and many other characters, too. But there's no single answer on what is the correct form of m3u files, as observable e.g. at https://github.com/MusicPlayerDaemon/MPD/issues/1831 and https://code.videolan.org/videolan/vlc/-/issues/19567

I'll try reading a bit more on this and try to come up with something as-good-as-possible.
Comment 3 Tuomas Nurmi 2025-08-03 15:12:03 UTC
Git commit 09b64d459540717c24c8c337f662c9b5101af303 by Tuomas Nurmi.
Committed on 03/08/2025 at 15:11.
Pushed by nurmi into branch 'master'.

Try to export as-compatible-as-possible playlist files

It is impossible to create playlist files that work with any audio player out
there [plenty of relevant discussion available in various bugtrackers]. However,
try to be just a little bit more compatible with anything by altering the
percent encoding behaviour a bit:
Encode everything for remote urls. Only encode delimiters for local files.
Probably helps more than breaks. Hopefully.

M  +1    -0    ChangeLog
M  +2    -2    src/core-impl/playlists/types/file/PlaylistFile.cpp
M  +16   -0    tests/core-impl/playlists/types/file/m3u/TestM3UPlaylist.cpp
M  +1    -2    tests/data/playlists/test2.m3u
M  +1    -1    tests/data/playlists/test2.pls

https://invent.kde.org/multimedia/amarok/-/commit/09b64d459540717c24c8c337f662c9b5101af303