Make .sub subtitle parser handle UTF-8 correctly

Fixes #1871