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
Showing only changes of commit 955ffc48d3 - Show all commits

View File

@@ -2142,7 +2142,20 @@ namespace RODBInterface
wraccid = accid;
string dt = string.Format("{0:yyyyMMddHHmmss}", System.DateTime.Now);
string xmlstr = GenerateXmlString(ro, false);
string strUpdate = "UPDATE " + ro.GetAttribute("Table") + " SET Info = '" + xmlstr + "'";
StringBuilder xmlstrTmp = new StringBuilder(); // B2026-025 prep the info field data so it will be saved correctly.
char[] chrAry = xmlstr.ToCharArray();
foreach (int chr in chrAry)
{
if (chr > 160)
mschill marked this conversation as resolved Outdated

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?
{
xmlstrTmp.Append($"\\u{(int)chr}?");
}
else
{
xmlstrTmp.Append((char)chr);
}
}
string strUpdate = "UPDATE " + ro.GetAttribute("Table") + " SET Info = '" + xmlstrTmp + "'";
mschill marked this conversation as resolved Outdated

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?

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.
if (movedRO)
{
VlnXmlElement parent = (VlnXmlElement)ro.ParentNode;
@@ -2645,7 +2658,20 @@ namespace RODBInterface
}
}
StatMsgWindow.StatusMessage = echild.GetAttribute("MenuTitle");
str = "UPDATE " + echild.GetAttribute("Table") + " SET Info = '" + tinfo2 + "'";
StringBuilder tinfo2Tmp = new StringBuilder(); // B2026-025 prep the info field data so it will be saved correctly.
char[] chrAry = tinfo2.ToCharArray();
foreach (int chr in chrAry)
{
if (chr > 160)
mschill marked this conversation as resolved Outdated

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?
{
tinfo2Tmp.Append($"\\u{(int)chr}?");
}
else
{
tinfo2Tmp.Append((char)chr);
}
}
str = "UPDATE " + echild.GetAttribute("Table") + " SET Info = '" + tinfo2Tmp + "'";
mschill marked this conversation as resolved Outdated

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() + "'"; ?
str = str + ", ModDateTime = '" + dt + "' WHERE RecID = '" + echild.GetAttribute("RecID") + "';";
DBE.Command(str);
DBE.Reader();