Fix writing files as non-utf-8

This commit is contained in:
Thomas Goyne 2014-05-08 17:47:09 -07:00
parent 94a060a556
commit 73d64870af
1 changed files with 1 additions and 1 deletions

View File

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