<bugzilla>
------- Additional Comment #4 From Juergen Spitzmueller 2007-05-05 12:02
-------
The problem is that LyX passes the text to preview-latex as a utf8-encoded
file, but doesn't indicate that with an appropriate inputenc option.
Have a look at the FIXME in PreviewLoader.cpp: 573. A simple way to get it work
would be:
Index: src/graphics/PreviewLoader.cpp
===================================================================
--- src/graphics/PreviewLoader.cpp (Revision 18203)
+++ src/graphics/PreviewLoader.cpp (Arbeitskopie)
@@ -582,6 +582,7 @@
}
of << "\\batchmode\n";
dumpPreamble(of);
+ of << "\n\\usepackage[utf8]{inputenc}\n";
of << "\n\\begin{document}\n";
dumpData(of, inprogress.snippets);
of << "\n\\end{document}\n";
but I suspect that hardcoding the inputenc call is not the appropriate
solution.
Georg, any input on that?
</bugzilla>
dumpData() looks like this:
...
// FIXME UNICODE
os << "\\begin{preview}\n"
<< from_utf8(it->first)
<< "\n\\end{preview}\n\n";
}
So why should Jürgen's patch not be correct?
When from_utf8 is used then we need a utf8 encoding.
Or is it generally wrong to generate a utf8 encoded file,
does this the FIXME UNICODE in dumpData mean?
Peter
P.S.: Could I use a wildcard in bugzilla's "Users to watch:"
to get all bugzilla changes?