B2021-039: Paste of symbols results in invalid symbols

This commit is contained in:
2021-04-20 11:54:32 +00:00
parent 9339a49002
commit 1e85522762
3 changed files with 45 additions and 12 deletions

View File

@@ -128,6 +128,14 @@ namespace Volian.Base.Library
rtnStr = rtnStr.Replace(@"\'ae",@"\u174?");
// convert \'a9 to \u169? this is for the copyright symbol. RTF converts the unicode character to \'a9
rtnStr = rtnStr.Replace(@"\'a9",@"\u169?");
// B2021-039: paste of the greek symbols was not working correctly, RTF was converting unicode, similar to above
for (int i = 0; i < 26; i++)
{
rtnStr = rtnStr.Replace(string.Format("\\'{0:x2}", 0xc0 + i) // upper case Greek
, string.Format("\\u{0}?", 912 + i));
rtnStr = rtnStr.Replace(string.Format("\\'{0:x2}", 0xe0 + i) // lower case Greek
, string.Format("\\u{0}?", 944 + i));
}
return rtnStr;
}
}