Skip to content
Extraits de code Groupes Projets
Valider 06367d5c rédigé par Thomas Goyne's avatar Thomas Goyne
Parcourir les fichiers

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.
parent 548fbd81
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -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);
}
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter