B2026-025_Unicode_removed_from_RO_menu_titles_in_treeview #729

Merged
jjenko merged 5 commits from B2026-025_Unicode_removed_from_RO_menu_titles_in_treeview into Development 2026-03-10 13:23:59 -04:00
Owner

B2026-025 Unicode removed from RO menu titles in treeview.

B2026-025 Unicode removed from RO menu titles in treeview.
plarsen self-assigned this 2026-03-08 11:34:38 -04:00
jjenko was assigned by plarsen 2026-03-08 11:34:38 -04:00
mvickers was assigned by plarsen 2026-03-08 11:34:38 -04:00
plarsen added 1 commit 2026-03-08 11:34:38 -04:00
plarsen requested review from jjenko 2026-03-08 11:34:38 -04:00
mschill requested changes 2026-03-09 07:09:20 -04:00
Dismissed
mschill left a comment
Owner

See notes.

See notes.
@@ -2189,0 +2190,4 @@
char[] chrAry = xmlstr.ToCharArray();
foreach (int chr in chrAry)
{
if (chr > 160)
Owner

should this be 160 or 166?

In ctlXMLEdit.cs you have:

				{
					if (chr > 166)
					{
						result1.Append($"\\u{(int)chr}?");
					}
					else
					{
						result1.Append((char)chr);
					}

could be mistaken, but would think this would be consistent?

should this be 160 or 166? In ctlXMLEdit.cs you have: { if (chr > 166) { result1.Append($"\\u{(int)chr}?"); } else { result1.Append((char)chr); } could be mistaken, but would think this would be consistent?
@@ -2210,3 +2224,3 @@
strInsert = "INSERT INTO " + parent.GetAttribute("Table") + "( RecID, RecType, ParentID, ModDateTime, AccPageID, Info ) ";
strInsert = strInsert + " VALUES ('" + ro.GetAttribute("RecID") + "'," + (uint)RecordType.Group + ",'" + ro.GetAttribute("ParentID");
strInsert = strInsert + "','" + wraccid + "','" + dt + "','" + xmlstr + "');";
strInsert = strInsert + "','" + wraccid + "','" + dt + "','" + xmlstrTmp + "');";
Owner

Ideally, these inserts would be done a different way as concatenating SQL together like this could risk sql injection --- that being said - I believe that would be beyond the scope of this project / CSM item.

Ideally, these inserts would be done a different way as concatenating SQL together like this could risk sql injection --- that being said - I believe that would be beyond the scope of this project / CSM item.
@@ -518,3 +519,3 @@
cnt++;
}
if ((cnt + text.Length) > frmt2) // longer than the field length?
// string sym = symbcode < 256 ? ((char)symbcode).ToString() : string.Format(@"\u{0}", symbcode);
Owner

Should commented out code be removed?

Should commented out code be removed?
mschill marked this conversation as resolved
@@ -519,2 +520,3 @@
}
if ((cnt + text.Length) > frmt2) // longer than the field length?
// string sym = symbcode < 256 ? ((char)symbcode).ToString() : string.Format(@"\u{0}", symbcode);
text = Regex.Replace(text, @"\\u([0-9]{1,4})\?", m => Convert.ToChar(int.Parse(m.Groups[1].Value)).ToString()); //B2026-025 Unicode removed from RO menu titles in treeview.
Owner

Does there need to be a null check / try parse here?

Does there need to be a null check / try parse here?
mschill marked this conversation as resolved
plarsen added 1 commit 2026-03-09 11:38:54 -04:00
mschill requested changes 2026-03-09 12:41:13 -04:00
Dismissed
mschill left a comment
Owner

see notes - let me know if you have any questions.

see notes - let me know if you have any questions.
@@ -2146,0 +2146,4 @@
char[] chrAry = xmlstr.ToCharArray();
foreach (int chr in chrAry)
{
if (chr > 160)
Owner

should this be 160 or 166?

In ctlXMLEdit.cs you have:

			{
				if (chr > 166)
				{
					result1.Append($"\\u{(int)chr}?");
				}
				else
				{
					result1.Append((char)chr);
				}

could be mistaken, but would think this would be consistent?

should this be 160 or 166? In ctlXMLEdit.cs you have: { if (chr > 166) { result1.Append($"\\u{(int)chr}?"); } else { result1.Append((char)chr); } could be mistaken, but would think this would be consistent?
mschill marked this conversation as resolved
@@ -2146,0 +2155,4 @@
xmlstrTmp.Append((char)chr);
}
}
string strUpdate = "UPDATE " + ro.GetAttribute("Table") + " SET Info = '" + xmlstrTmp + "'";
Owner

here - it looks like you are concatenating a stringbuilder with a string --- should

this line have xmlstrTmp.ToString() instead?

here - it looks like you are concatenating a stringbuilder with a string --- should this line have xmlstrTmp.ToString() instead?
Author
Owner

Well in my testing the data was saved just fine, but I will added the tostring(). I do not think it will hurt.

Well in my testing the data was saved just fine, but I will added the tostring(). I do not think it will hurt.
mschill marked this conversation as resolved
@@ -2189,0 +2203,4 @@
char[] chrAry = xmlstr.ToCharArray();
foreach (int chr in chrAry)
{
if (chr > 160)
Owner

should this be 160 or 166?

In ctlXMLEdit.cs you have:

			{
				if (chr > 166)
				{
					result1.Append($"\\u{(int)chr}?");
				}
				else
				{
					result1.Append((char)chr);
				}

could be mistaken, but would think this would be consistent?

should this be 160 or 166? In ctlXMLEdit.cs you have: { if (chr > 166) { result1.Append($"\\u{(int)chr}?"); } else { result1.Append((char)chr); } could be mistaken, but would think this would be consistent?
mschill marked this conversation as resolved
@@ -2210,3 +2237,3 @@
strInsert = "INSERT INTO " + parent.GetAttribute("Table") + "( RecID, RecType, ParentID, ModDateTime, AccPageID, Info ) ";
strInsert = strInsert + " VALUES ('" + ro.GetAttribute("RecID") + "'," + (uint)RecordType.Group + ",'" + ro.GetAttribute("ParentID");
strInsert = strInsert + "','" + wraccid + "','" + dt + "','" + xmlstr + "');";
strInsert = strInsert + "','" + wraccid + "','" + dt + "','" + xmlstrTmp + "');";
Owner

here - it looks like you are concatenating a stringbuilder with a string --- should

this line have xmlstrTmp.ToString() instead?

here - it looks like you are concatenating a stringbuilder with a string --- should this line have xmlstrTmp.ToString() instead?
mschill marked this conversation as resolved
@@ -2216,3 +2243,3 @@
strInsert = "INSERT INTO " + parent.GetAttribute("Table") + "( RecID, RecType, ParentID, ModDateTime, Info ) ";
strInsert = strInsert + " VALUES ('" + ro.GetAttribute("RecID") + "'," + (uint)RecordType.Group + ",'" + ro.GetAttribute("ParentID");
strInsert = strInsert + "','" + dt + "','" + xmlstr + "');";
strInsert = strInsert + "','" + dt + "','" + xmlstrTmp + "');";
Owner

here - it looks like you are concatenating a stringbuilder with a string --- should

this line have xmlstrTmp.ToString() instead?

here - it looks like you are concatenating a stringbuilder with a string --- should this line have xmlstrTmp.ToString() instead?
mschill marked this conversation as resolved
@@ -2224,3 +2251,3 @@
strInsert = "INSERT INTO " + parent.GetAttribute("Table") + "( RecID, RecType, ParentID, AccPageId, ModDateTime, Info ) ";
strInsert = strInsert + " VALUES ('" + ro.GetAttribute("RecID") + "'," + (uint)RecordType.RRO + ",'" + ro.GetAttribute("ParentID");
strInsert = strInsert + "','" + wraccid + "','" + dt + "','" + xmlstr + "');";
strInsert = strInsert + "','" + wraccid + "','" + dt + "','" + xmlstrTmp + "');";
Owner

here - it looks like you are concatenating a stringbuilder with a string --- should

this line have xmlstrTmp.ToString() instead?

here - it looks like you are concatenating a stringbuilder with a string --- should this line have xmlstrTmp.ToString() instead?
mschill marked this conversation as resolved
@@ -2635,0 +2662,4 @@
char[] chrAry = tinfo2.ToCharArray();
foreach (int chr in chrAry)
{
if (chr > 160)
Owner

should this be 160 or 166?

In ctlXMLEdit.cs you have:

			{
				if (chr > 166)
				{
					result1.Append($"\\u{(int)chr}?");
				}
				else
				{
					result1.Append((char)chr);
				}

could be mistaken, but would think this would be consistent?

should this be 160 or 166? In ctlXMLEdit.cs you have: { if (chr > 166) { result1.Append($"\\u{(int)chr}?"); } else { result1.Append((char)chr); } could be mistaken, but would think this would be consistent?
mschill marked this conversation as resolved
@@ -2635,0 +2671,4 @@
tinfo2Tmp.Append((char)chr);
}
}
str = "UPDATE " + echild.GetAttribute("Table") + " SET Info = '" + tinfo2Tmp + "'";
Owner

here - it looks like you are concatenating a stringbuilder with a string --- should

str = "UPDATE " + echild.GetAttribute("Table") + " SET Info = '" + tinfo2Tmp + "'";

be

str = "UPDATE " + echild.GetAttribute("Table") + " SET Info = '" + tinfo2Tmp.ToString() + "'";

?

here - it looks like you are concatenating a stringbuilder with a string --- should str = "UPDATE " + echild.GetAttribute("Table") + " SET Info = '" + tinfo2Tmp + "'"; be str = "UPDATE " + echild.GetAttribute("Table") + " SET Info = '" + tinfo2Tmp.ToString() + "'"; ?
mschill marked this conversation as resolved
plarsen added 1 commit 2026-03-09 14:23:57 -04:00
plarsen added 1 commit 2026-03-10 11:48:09 -04:00
plarsen added 1 commit 2026-03-10 11:54:29 -04:00
mschill approved these changes 2026-03-10 13:04:18 -04:00
mschill left a comment
Owner

Looks good. Ready for QA.

Looks good. Ready for QA.
jjenko approved these changes 2026-03-10 13:23:43 -04:00
jjenko left a comment
Owner

changes look good

changes look good
jjenko merged commit 1e12c82be4 into Development 2026-03-10 13:23:59 -04:00
Member

Final update was put on 3/10/26. Tested with PROMS version 2.3.2603.1014 and verified no unicode symbols displayed anywhere.

Final update was put on 3/10/26. Tested with PROMS version 2.3.2603.1014 and verified no unicode symbols displayed anywhere.
Sign in to join this conversation.
No Reviewers
No Label
4 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Volian/SourceCode#729