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:
André Pönitz 2008-10-11 16:07:14 +00:00
parent 204984d2a7
commit 01bb9e2a57

View File

@ -329,15 +329,17 @@ void handle_package(string const & name, string const & opts,
// only set when there is not more than one inputenc option
// therefore check for the "," character
// 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")
//change ascii to auto to be in the unicode range, see
//http://bugzilla.lyx.org/show_bug.cgi?id=4719
h_inputencoding = "auto";
else
else if (!opts.empty())
h_inputencoding = opts;
}
options.clear();
}
else if (name == "makeidx")
; // 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") {
string const name = p.getArg('{', '}');
ostringstream ss;