riched20: Flush the output buffer before a codepage change.

This commit is contained in:
Huw Davies 2012-12-05 14:17:53 +00:00 committed by Alexandre Julliard
parent 11f41aa05a
commit 368f9123c9
1 changed files with 4 additions and 1 deletions

View File

@ -2397,8 +2397,11 @@ CharAttr(RTF_Info *info)
font = RTFGetFont(info, info->rtfParam);
if (font)
{
if (info->ansiCodePage != CP_UTF8)
if (info->ansiCodePage != CP_UTF8 && info->codePage != font->rtfFCodePage)
{
RTFFlushOutputBuffer(info);
info->codePage = font->rtfFCodePage;
}
TRACE("font %d codepage %d\n", info->rtfParam, info->codePage);
}
else