I have Document and folder in Live link containing German special characters Ää, Öö, Üü, ß. I extracted the document and folder name using following code of LiveLink API server version 9.2.0.0 and client version API version of LiveLink 9.5.0.0.
string encodedName = LLValueUtil.GetValue(mainLLObj, "Name").TrimEnd('.');
int charIndex = 0;
while (Array.IndexOf(WhitespaceChars, encodedName[charIndex]) >= 0) {
string replacement = System.Xml.XmlConvert.EncodeName(encodedName[charIndex].ToString());
encodedName = encodedName.Substring(0, charIndex) + replacement + encodedName.Substring(charIndex + 1);
charIndex += replacement.Length;
}
charIndex = encodedName.Length - 1;
// Replaces trailing WhitespaceChars
while (Array.IndexOf(WhitespaceChars, encodedName[charIndex]) >= 0) {
string replacement = System.Xml.XmlConvert.EncodeName(encodedName[charIndex].ToString());
string lastPart = encodedName.Substring(charIndex + 1);
encodedName = encodedName.Substring(0, charIndex) + replacement + lastPart;
charIndex = encodedName.Length - replacement.Length - lastPart.Length - 1;
}
string documentName = encodedName; // give fine File name
this code works fine in Livelink sever API version 9.5.0.0. but does not work in LiveLink API server version 9.7.1. Could you help me fixing for this issue ?