fix a crash when using iso10646-1 encoding

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH-1_2_X@4721 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Dekel Tsur 2002-07-20 13:35:06 +00:00
parent 22a7b50c03
commit b2dce214b7
2 changed files with 15 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2002-07-20 Dekel Tsur <dekelts@tau.ac.il>
* language.C (read): Use iso8859-1 encoding in latex_lang
(this prevents LyX from crashing when using iso10646-1 encoding).
2002-07-19 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
* text2.C (toggleInset): if cursor is inside an inset, close the

View File

@ -37,6 +37,11 @@ Language const * inherit_language = &inherit_lang;
void Languages::setDefaults()
{
// We need this to set the encoding of latex_lang
latex_lang = Language("latex", "latex", "Latex", false,
encodings.getEncoding("iso8859-1"),
"latex", "");
languagelist["english"] = Language("english", "english", N_("English"),
false,
encodings.getEncoding("iso8859-1"),
@ -46,6 +51,11 @@ void Languages::setDefaults()
void Languages::read(string const & filename)
{
// We need this to set the encoding of latex_lang
latex_lang = Language("latex", "latex", "Latex", false,
encodings.getEncoding("iso8859-1"),
"latex", "");
LyXLex lex(0, 0);
lex.setFile(filename);
while (lex.isOK()) {