mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
Write fixed encoding to LyX file (bug #9178)
If the user gave the -fixednec argument to tex2lyx then set that encoding as LaTeX input encoding in the generated LyX file. Otherwise, included .bib files could be interpreted using a wrong encoding.
This commit is contained in:
parent
ff9b4a3834
commit
cd3b040a70
@ -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; }
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user