mirror of
https://github.com/odrling/Aegisub
synced 2025-04-11 22:56:02 +02:00
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
@ -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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user