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:
parent
548fbd814b
commit
06367d5cd9
1 changed files with 1 additions and 2 deletions
|
@ -34,8 +34,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();
|
||||||
boost::to_lower(encoding);
|
if (encoding != "utf-8" && encoding != "UTF-8") {
|
||||||
if (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);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue