diff --git a/lib/encodings b/lib/encodings index 5b1a3a9f03..7a78ca622c 100644 --- a/lib/encodings +++ b/lib/encodings @@ -95,6 +95,7 @@ End Encoding cp1251 cp1251 "Cyrillic (CP 1251)" CP1251 fixed inputenc End +# "ansinew" is harcoded as a synonym of this (see Encodings::fromLaTeXName) Encoding cp1252 cp1252 "Western European (CP 1252)" CP1252 fixed inputenc End diff --git a/src/Encoding.cpp b/src/Encoding.cpp index 3fc30ca5db..68dc5351cc 100644 --- a/src/Encoding.cpp +++ b/src/Encoding.cpp @@ -696,8 +696,14 @@ Encoding const * Encodings::fromLyXName(string const & name) const } -Encoding const * Encodings::fromLaTeXName(string const & name) const +Encoding const * Encodings::fromLaTeXName(string const & n) const { + string name = n; + // FIXME: if we have to test for too many of these synonyms, + // we should instead extend the format of lib/encodings + if (n == "ansinew") + name = "cp1252"; + // We don't use find_if because it makes copies of the pairs in // the map. // This linear search is OK since we don't have many encodings. diff --git a/status.16x b/status.16x index d5f9cf2ba9..8c9cde3171 100644 --- a/status.16x +++ b/status.16x @@ -80,6 +80,9 @@ What's new - Fix a tex2lyx crash when importing a LaTeX file using an unknown encoding (bug 6142) +- add encoding "ansinew" as a synonym of "cp1252" for the benefit of + tex2lyx (bug 6142) + - Fix support for polytonic Greek with multiple diacritics (bug 5976). - Do not unnecessarily enquote brackets in the LaTeX output (bug 5988).