mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-10 20:04:46 +00:00
fix problem with non-recognized utf8 encoding that lead to broken .lyx
files git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26844 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
204984d2a7
commit
01bb9e2a57
@ -329,15 +329,17 @@ void handle_package(string const & name, string const & opts,
|
|||||||
// only set when there is not more than one inputenc option
|
// only set when there is not more than one inputenc option
|
||||||
// therefore check for the "," character
|
// therefore check for the "," character
|
||||||
// also only set when there is not more then one babel language option
|
// also only set when there is not more then one babel language option
|
||||||
if (opts.find(",") == string::npos && one_language == true)
|
if (opts.find(",") == string::npos && one_language == true) {
|
||||||
if (opts == "ascii")
|
if (opts == "ascii")
|
||||||
//change ascii to auto to be in the unicode range, see
|
//change ascii to auto to be in the unicode range, see
|
||||||
//http://bugzilla.lyx.org/show_bug.cgi?id=4719
|
//http://bugzilla.lyx.org/show_bug.cgi?id=4719
|
||||||
h_inputencoding = "auto";
|
h_inputencoding = "auto";
|
||||||
else
|
else if (!opts.empty())
|
||||||
h_inputencoding = opts;
|
h_inputencoding = opts;
|
||||||
|
}
|
||||||
options.clear();
|
options.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (name == "makeidx")
|
else if (name == "makeidx")
|
||||||
; // ignore this
|
; // ignore this
|
||||||
|
|
||||||
@ -666,6 +668,10 @@ void parse_preamble(Parser & p, ostream & os,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
else if (t.cs() == "inputencoding") {
|
||||||
|
h_inputencoding = p.getArg('{','}');
|
||||||
|
}
|
||||||
|
|
||||||
else if (t.cs() == "newenvironment") {
|
else if (t.cs() == "newenvironment") {
|
||||||
string const name = p.getArg('{', '}');
|
string const name = p.getArg('{', '}');
|
||||||
ostringstream ss;
|
ostringstream ss;
|
||||||
|
Loading…
Reference in New Issue
Block a user