On 2009-04-22, E. Kaplan wrote: >>> 2. When trying to import a Latex file into Lyx it gagged on the >>> umlauts in the Latex file ( W\"assle )
>>> How do I get around it? >> Did you try the way LyX writes Umlauts? > Yes, I tried both ways of writing umlauts, but both failed. As you do not provide a minimal (but complete) example, I can only guess that it is the encoding problem described below. Here is a minimal example: \documentclass[]{article} \usepackage{lmodern} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \begin{document} Günter G\"unter G\"{u}nter \end{document} When importing, tex2lyx works fine but the lyx2lyx step fails: Warning: #LyX file created by tex2lyx 1.6.2 Traceback (most recent call last): File "/usr/share/lyx/lyx2lyx/lyx2lyx", line 83, in <module> main() File "/usr/share/lyx/lyx2lyx/lyx2lyx", line 76, in main doc = LyX.File(**options.__dict__) File "/usr/share/lyx/lyx2lyx/LyX.py", line 652, in __init__ self.read() File "/usr/share/lyx/lyx2lyx/LyX.py", line 287, in read line = self.input.readline().decode(self.encoding) File "/usr/lib/python2.5/encodings/utf_8.py", line 16, in decode return codecs.utf_8_decode(input, errors, True) UnicodeDecodeError: 'utf8' codec can't decode bytes in position 9-14: unsupported Unicode code range Error: Das Konvertierungsskript ist fehlgeschlagen ---------------------------------------- /home/milde/Texte/Test/LyX/LyX16-bugs/import-umlauts.lyx stammt von einer anderen LyX-Version, aber das lyx2lyx-Skript konnte das Dokument nicht konvertieren. Looking at the LyX file in a text editor revealed, that \"u and \"{u} are both converted to a latin-1 encoded ü. Converting to UTF-8 did not help, but changing -\usepackage[utf8]{inputenc} +\usepackage[latin1]{inputenc} did (of course after converting the UTF-8 encoded ü). Günter