From 368f9123c9e465e2f212e35ee5c920847c73b5af Mon Sep 17 00:00:00 2001 From: Huw Davies Date: Wed, 5 Dec 2012 14:17:53 +0000 Subject: [PATCH] riched20: Flush the output buffer before a codepage change. --- dlls/riched20/reader.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dlls/riched20/reader.c b/dlls/riched20/reader.c index 9f88cf77554..02d46363f0c 100644 --- a/dlls/riched20/reader.c +++ b/dlls/riched20/reader.c @@ -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