Fixed UTF-8 RTF parsing.
This commit is contained in:
parent
7bb3b2d32e
commit
bd10348ec9
|
@ -2556,6 +2556,9 @@ CharAttr(RTF_Info *info)
|
||||||
static void
|
static void
|
||||||
CharSet(RTF_Info *info)
|
CharSet(RTF_Info *info)
|
||||||
{
|
{
|
||||||
|
if (info->ansiCodePage == CP_UTF8)
|
||||||
|
return;
|
||||||
|
|
||||||
switch (info->rtfMinor)
|
switch (info->rtfMinor)
|
||||||
{
|
{
|
||||||
case rtfAnsiCharSet:
|
case rtfAnsiCharSet:
|
||||||
|
@ -2594,10 +2597,10 @@ DocAttr(RTF_Info *info)
|
||||||
switch (info->rtfMinor)
|
switch (info->rtfMinor)
|
||||||
{
|
{
|
||||||
case rtfAnsiCodePage:
|
case rtfAnsiCodePage:
|
||||||
info->ansiCodePage = info->rtfParam;
|
info->codePage = info->ansiCodePage = info->rtfParam;
|
||||||
break;
|
break;
|
||||||
case rtfUTF8RTF:
|
case rtfUTF8RTF:
|
||||||
info->ansiCodePage = CP_UTF8;
|
info->codePage = info->ansiCodePage = CP_UTF8;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue