Fixed logic for Find/Replace of backslash and symbol characters B2016-156
Moved repeated logic to a static function RTFConvertedSymbolsToUnicode which is needed for Find/Replace. Used in DisplayText.cs, FindReplace.cs, and VlnFlexGrid B2016-156 Fixed finding backslash and symbols B2016-156 Fixed finding backslash and symbols in tables (grids) B2016-156
This commit is contained in:
@@ -114,5 +114,21 @@ namespace Volian.Base.Library
|
||||
rtfprefix += @"\i";
|
||||
return rtfprefix;
|
||||
}
|
||||
public static string RTFConvertedSymbolsToUnicode(string str)
|
||||
{
|
||||
string rtnStr = str;
|
||||
// convert \~ to a hard spece. RTF is automatically converting \u160? to \~ but will then convert
|
||||
// the \~ to a regular space!
|
||||
rtnStr = rtnStr.Replace(@"\~", @"\u160?");
|
||||
rtnStr = rtnStr.Replace(@"\'a0", @"\u160?");
|
||||
// convert \'99 to \u8482? this is for the trade mark symbol. RTF is automatically
|
||||
// converting the unicode \u8482? to \'99, but once this is done, PROMS StepRTB (edit windows) does not show it
|
||||
rtnStr = rtnStr.Replace(@"\'99", @"\u8482?");
|
||||
// convert \'ae to \u174? this is for the registered symbol. RTF converts the unicode character to \'ae
|
||||
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?");
|
||||
return rtnStr;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user