Don't convert encoding names to lowercase when writing files

Not only is it unnecessary, but it actively breaks the mapping of
user-friendly encoding names in the Export dialog to the real encoding
names.

Closes #1789.
This commit is contained in:
Thomas Goyne 2014-07-10 20:39:24 -07:00
parent 548fbd814b
commit 06367d5cd9

View file

@ -34,8 +34,7 @@ TextFileWriter::TextFileWriter(agi::fs::path const& filename, std::string encodi
{
if (encoding.empty())
encoding = OPT_GET("App/Save Charset")->GetString();
boost::to_lower(encoding);
if (encoding != "utf-8") {
if (encoding != "utf-8" && encoding != "UTF-8") {
conv = agi::make_unique<agi::charset::IconvWrapper>("utf-8", encoding.c_str(), true);
newline = conv->Convert(newline);
}