Fix a crash when using iso10646-1 encoding

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4720 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Dekel Tsur 2002-07-20 13:30:55 +00:00
parent 0cba879b03
commit 8d31cc69bc
3 changed files with 16 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 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 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()) {

View File

@ -0,0 +1 @@
timestamp