On Sun, Aug 31, 2008 at 01:46:07PM +0200, Andre Poenitz wrote: > On Sun, Aug 31, 2008 at 11:47:55AM +0200, Enrico Forestieri wrote: > > On Sun, Aug 31, 2008 at 10:58:09AM +0200, Pavel Sanda wrote: > > > > > now i get assert: > > > > Sorry, my bad. Try the attached, instead. > > > > -- > > Enrico > > > Index: src/mathed/InsetMathHull.cpp > > =================================================================== > > --- src/mathed/InsetMathHull.cpp (revision 26272) > > +++ src/mathed/InsetMathHull.cpp (working copy) > > @@ -35,6 +35,7 @@ > > #include "Cursor.h" > > #include "DispatchResult.h" > > #include "FuncRequest.h" > > +#include "Language.h" > > #include "LyXRC.h" > > #include "OutputParams.h" > > #include "ParIterator.h" > > @@ -445,7 +446,10 @@ void InsetMathHull::drawT(TextPainter & > > static docstring latexString(InsetMathHull const & inset) > > { > > odocstringstream ls; > > - WriteStream wi(ls, false, false, false); > > + Encoding const * encoding = 0; > > + if (inset.isBufferValid()) > > + encoding = inset.buffer().language()->encoding(); > > + WriteStream wi(ls, false, true, false, encoding); > > Is this curing the problem or just a workaround?
AFAIK the encoding bit cures the iconv problem, the isBufferValid() bit is a workaround, but it WFM. > Why can inset.isBufferValid() be false at that point? Good question. -- Enrico