mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-23 13:31:49 +00:00
We may have buffers with different encodings, that, in turn, may also
be different from the language default ones. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26290 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
759e583db8
commit
8d6b5113ec
@ -450,7 +450,9 @@ static docstring latexString(InsetMathHull const & inset)
|
|||||||
// in text mode (such as $\text{$\phi$}$) gets processed twice. The
|
// in text mode (such as $\text{$\phi$}$) gets processed twice. The
|
||||||
// first time as a whole, and the second time only the inner math.
|
// first time as a whole, and the second time only the inner math.
|
||||||
// In this last case inset.buffer() would be invalid.
|
// In this last case inset.buffer() would be invalid.
|
||||||
static Encoding const * encoding = inset.buffer().language()->encoding();
|
static Encoding const * encoding = 0;
|
||||||
|
if (inset.isBufferValid())
|
||||||
|
encoding = &(inset.buffer().params().encoding());
|
||||||
WriteStream wi(ls, false, true, false, encoding);
|
WriteStream wi(ls, false, true, false, encoding);
|
||||||
inset.write(wi);
|
inset.write(wi);
|
||||||
return ls.str();
|
return ls.str();
|
||||||
|
Loading…
Reference in New Issue
Block a user