mirror of https://github.com/odrling/Aegisub
Fix writing files as non-utf-8
This commit is contained in:
parent
94a060a556
commit
73d64870af
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue