From 955ffc48d384ef86ee352eba7bbc31d0ea27fab6 Mon Sep 17 00:00:00 2001 From: Paul Larsen Date: Mon, 9 Mar 2026 11:41:13 -0400 Subject: [PATCH] B2026-025_Unicode_removed_from_RO_menu_titles_in_treeview --- .../LibSource/RODBInterface/RODBInterface.cs | 30 +++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/PROMS/ReferencedObjects/LibSource/RODBInterface/RODBInterface.cs b/PROMS/ReferencedObjects/LibSource/RODBInterface/RODBInterface.cs index a92492ee..d68d0c14 100644 --- a/PROMS/ReferencedObjects/LibSource/RODBInterface/RODBInterface.cs +++ b/PROMS/ReferencedObjects/LibSource/RODBInterface/RODBInterface.cs @@ -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) + { + xmlstrTmp.Append($"\\u{(int)chr}?"); + } + else + { + xmlstrTmp.Append((char)chr); + } + } + string strUpdate = "UPDATE " + ro.GetAttribute("Table") + " SET Info = '" + xmlstrTmp + "'"; 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) + { + tinfo2Tmp.Append($"\\u{(int)chr}?"); + } + else + { + tinfo2Tmp.Append((char)chr); + } + } + str = "UPDATE " + echild.GetAttribute("Table") + " SET Info = '" + tinfo2Tmp + "'"; str = str + ", ModDateTime = '" + dt + "' WHERE RecID = '" + echild.GetAttribute("RecID") + "';"; DBE.Command(str); DBE.Reader();