diff --git a/src/library/filescanner_playlist.c b/src/library/filescanner_playlist.c index ce1d3d0b..c23193dd 100644 --- a/src/library/filescanner_playlist.c +++ b/src/library/filescanner_playlist.c @@ -456,6 +456,10 @@ scan_playlist(const char *file, time_t mtime, int dir_id) { len = strlen(buf); + // Check for and strip byte-order mark + if (memcmp("\xef\xbb\xbf", buf, 3) == 0) + memmove(buf, buf + 3, len - 3 + 1); + // rtrim and check that length is sane (ignore blank lines) while ((len > 0) && isspace(buf[len - 1])) {