I have .m3u files generated in Linux which can't be read by Windows programs due to different way to treat special characters in paths.
For example, how can I convert this Linux path:
Music/Timo%20Rautiainen%20&%20Trio%20Niskalaukaus/07%20H%C3%A4mmennys%20ja%20viha.mp3
into this path readable in Windows:
Music/Timo Rautiainen & Trio Niskalaukaus/07 Hämmennys ja viha.mp3
in a text file?
It would be easy if I could just replace all instances of %20 with spaces, but as you can see above there are special characters (äöñ etc.) in the paths and filenames which need to be converted, also. These are too varied to be done with regex, and I don't even have a list of all special characters in use in my files.
edit: as mentioned in comments, the above is a result of URL/URI encoding, rather than reasons I postulated.
Easy fix was to use an online URL encoder/decoder, which fixed the paths very quickly. This is the URL decoder I used. Accepted answer below with a native Linux Python method.