static string preprocess(string text, string lang) { try { text = ttlServ.UTF8toSGML(text); text = ttlServ.XCES(lang, lang, text); text = ttlServ.SGMLtoUTF7(text); ASCIIEncoding asciiEnc = new ASCIIEncoding(); text = Encoding.UTF8.GetString(UTF7Encoding.Convert(Encoding.UTF7, Encoding.UTF8, asciiEnc.GetBytes(text))); return(text); } catch (Exception e) { return(e.ToString()); } }