[LyX/master] Remove unnecessary conversion

Juergen Spitzmueller spitz at lyx.org
Mon Dec 19 08:59:18 UTC 2022


commit 0c6d0a86b926c5b01873ae972455b1ae7125f0ca
Author: Juergen Spitzmueller <spitz at lyx.org>
Date:   Mon Dec 19 10:52:42 2022 +0100

    Remove unnecessary conversion
---
 src/BufferParams.cpp |   10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/src/BufferParams.cpp b/src/BufferParams.cpp
index d94af3a..01be1bf 100644
--- a/src/BufferParams.cpp
+++ b/src/BufferParams.cpp
@@ -3404,9 +3404,8 @@ void BufferParams::writeEncodingPreamble(otexstream & os,
 		    && !features.isProvided("inputenc")) {
 			if (package == Encoding::inputenc) {
 				// Main language requires (lua)inputenc
-				os << "\\usepackage["
-				   << from_ascii(doc_encoding);
-				os << "]{" << inputenc_package << "}\n";
+				os << "\\usepackage[" << doc_encoding << "]{"
+				   << inputenc_package << "}\n";
 			} else {
 				// We might have an additional language that requires inputenc
 				set<string> encoding_set = features.getEncodingSet(doc_encoding);
@@ -3452,9 +3451,8 @@ void BufferParams::writeEncodingPreamble(otexstream & os,
 			    && features.isAvailable("ucs-2022/08/07")
 			    && !features.isProvided("ucs"))
 				os << "\\usepackage{ucs}\n";
-			os << "\\usepackage["
-			   << from_ascii(doc_encoding)
-			   << "]{" << inputenc_package << "}\n";
+			os << "\\usepackage[" << doc_encoding << "]{"
+			   << inputenc_package << "}\n";
 			break;
 		}
 	}


More information about the lyx-cvs mailing list