diff --git a/src/tex2lyx/Preamble.h b/src/tex2lyx/Preamble.h index 3216c3cc6d..a0e5198d73 100644 --- a/src/tex2lyx/Preamble.h +++ b/src/tex2lyx/Preamble.h @@ -37,6 +37,8 @@ public: /// std::string inputencoding() const { return h_inputencoding; } /// + void setInputencoding(std::string const & e) { h_inputencoding = e; } + /// std::string notefontcolor() const { return h_notefontcolor; } /// bool refstyle() const { return h_use_refstyle; } diff --git a/src/tex2lyx/tex2lyx.cpp b/src/tex2lyx/tex2lyx.cpp index 2ef209fc42..e4c26603b1 100644 --- a/src/tex2lyx/tex2lyx.cpp +++ b/src/tex2lyx/tex2lyx.cpp @@ -789,14 +789,6 @@ bool roundtripMode() } -string fixedEncoding() -{ - if (fixed_encoding) - return default_encoding; - return ""; -} - - namespace { /*! @@ -1065,6 +1057,8 @@ int main(int argc, char * argv[]) if (!enc) error_message("Unknown LaTeX encoding `" + default_encoding + "'"); default_encoding = enc->iconvName(); + if (fixed_encoding) + preamble.setInputencoding(enc->name()); } // Load the layouts