mpc-hc/mpc-hc — pull request #69 by Nevcairiel (2013-04-07 11:54:43+00:00)
Title: Improve handling of UTF-8 subtitles with BOM

The UTF-8 auto-detection will currently fallback to ASCII/ANSI mode as soon as one invalid UTF-8 character is detected, which can lead to proper UTF-8 files not working, because the creator accidentally mixed a few non-UTF8 character in the file.

Instead, if the file actually has a UTF-8 BOM, don't fallback to ASCII/ANSI, and trust the BOM.

This fixes parsing of subtitles like this:
http://pan.baidu.com/share/link?shareid=421917&uk=3558042035

The subtitles themself are completely UTF-8, however there is two lines of comments in the file which include non-UTF-8 characters.