Fix overriding charset for subtitle files

IconvWrapper needs the non-lowercased charset for the pretty -> real
name mapping to work.
This commit is contained in:
Thomas Goyne 2013-10-06 07:11:53 -07:00
parent 6f79d8731f
commit 822c596206

View file

@ -71,8 +71,7 @@ public:
, lf('\n')
, width(1)
{
boost::to_lower(encoding);
if (encoding != "utf-8") {
if (boost::to_lower_copy(encoding) != "utf-8") {
agi::charset::IconvWrapper c("utf-8", encoding.c_str());
c.Convert("\r", 1, reinterpret_cast<char *>(&cr), sizeof(int));
c.Convert("\n", 1, reinterpret_cast<char *>(&lf), sizeof(int));