ironsmile / euterpe

Self-hosted music streaming server 🎶 with RESTful API and Web interface. Think of it as your very own Spotify! ☁️🎧
https://listen-to-euterpe.eu
GNU General Public License v3.0
522 stars 42 forks source link

Fallback encoding for non-UTF8 meta data #12

Open ironsmile opened 7 years ago

ironsmile commented 7 years ago

As most who do not speak english as their native language know, not all meta data in music files in the wild is in ASCII or Unicode. This is certainly the case for my own library. The current implementation of httpms does not handle this at all.

So I think the following scheme would solve the problem. A fallback_encoding setting is introduced. Whenever a string is not encoded with UTF8, this fallback encoding would be assumed and used to read it.

This scheme does not solve the problem completely. What happens when you have files with two (or more) different and exotic encodings? But at the moment it is the simplest solution which will solve my particular case.