From a53dd33474f51645b5c692751fc036d4a7a03dcd Mon Sep 17 00:00:00 2001 From: Georg Baum Date: Sat, 23 Feb 2013 12:23:29 +0100 Subject: [PATCH] Fix lyx2lyx for layout files with umlauts lyx2lyx died with UnicodeDecodeError: 'ascii' codec can't decode byte if a layout with a non-ASCII character in the file name was used, since the textclass member of the LyX class was of type str, and not unicode. --- lib/lyx2lyx/LyX.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/lyx2lyx/LyX.py b/lib/lyx2lyx/LyX.py index 878017dc4b..4174b5f15a 100644 --- a/lib/lyx2lyx/LyX.py +++ b/lib/lyx2lyx/LyX.py @@ -324,6 +324,8 @@ class LyX_base: self.initial_version = self.read_version() # Second pass over header and preamble, now we know the file encoding + # Do not forget the textclass (Debian bug #700828) + self.textclass = self.textclass.decode(self.encoding) for i in range(len(self.header)): self.header[i] = self.header[i].decode(self.encoding) for i in range(len(self.preamble)):