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.
This commit is contained in:
Georg Baum 2013-02-23 12:23:29 +01:00
parent c05f819ce8
commit a53dd33474

View File

@ -324,6 +324,8 @@ class LyX_base:
self.initial_version = self.read_version() self.initial_version = self.read_version()
# Second pass over header and preamble, now we know the file encoding # 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)): for i in range(len(self.header)):
self.header[i] = self.header[i].decode(self.encoding) self.header[i] = self.header[i].decode(self.encoding)
for i in range(len(self.preamble)): for i in range(len(self.preamble)):