Move the line of code that replaces a backslash with the \u8596? Symbol to the top of ReplaceUnicode B2016-151

This commit is contained in:
John Jenko 2016-06-24 16:14:25 +00:00
parent 0de1302e15
commit a29f374023

View File

@ -226,6 +226,7 @@ namespace VEPROMS.CSLA.Library
private string ReplaceUnicode(string s2, bool DoCaret) private string ReplaceUnicode(string s2, bool DoCaret)
{ {
string orig = s2; string orig = s2;
s2 = s2.Replace(@"\", @"\u9586?"); // convert backslashes to a backslash symbol
s2 = s2.Replace("`", @"\'b0"); // convert backquote to degree - left over from DOS days. s2 = s2.Replace("`", @"\'b0"); // convert backquote to degree - left over from DOS days.
s2 = s2.Replace("\xf8", @"\'b0"); // convert \xf8 to degree. s2 = s2.Replace("\xf8", @"\'b0"); // convert \xf8 to degree.
s2 = s2.Replace("\xa0", @"\u160?"); // hardspace s2 = s2.Replace("\xa0", @"\u160?"); // hardspace
@ -273,8 +274,6 @@ namespace VEPROMS.CSLA.Library
//if the dash is preceeded byte a token remove the space following the token //if the dash is preceeded byte a token remove the space following the token
s2 = Regex.Replace(s2, @"(\\[^ \\?]*) \-", @"$1\u8209?"); s2 = Regex.Replace(s2, @"(\\[^ \\?]*) \-", @"$1\u8209?");
s2 = s2.Replace("-", @"\u8209?"); s2 = s2.Replace("-", @"\u8209?");
// convert backslashes to a backslash symbol
s2 = s2.Replace(@"\", @"\u9586?");
return s2; return s2;
} }
private string FixUnitROs(string val) private string FixUnitROs(string val)