From bd10348ec9e84a14f6daf185f7549ff0ef60369d Mon Sep 17 00:00:00 2001 From: Phil Krylov Date: Mon, 8 Aug 2005 11:05:36 +0000 Subject: [PATCH] Fixed UTF-8 RTF parsing. --- dlls/riched20/reader.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/dlls/riched20/reader.c b/dlls/riched20/reader.c index caecb52f8d3..758e5abc807 100644 --- a/dlls/riched20/reader.c +++ b/dlls/riched20/reader.c @@ -2556,6 +2556,9 @@ CharAttr(RTF_Info *info) static void CharSet(RTF_Info *info) { + if (info->ansiCodePage == CP_UTF8) + return; + switch (info->rtfMinor) { case rtfAnsiCharSet: @@ -2594,10 +2597,10 @@ DocAttr(RTF_Info *info) switch (info->rtfMinor) { case rtfAnsiCodePage: - info->ansiCodePage = info->rtfParam; + info->codePage = info->ansiCodePage = info->rtfParam; break; case rtfUTF8RTF: - info->ansiCodePage = CP_UTF8; + info->codePage = info->ansiCodePage = CP_UTF8; break; } }