Search code examples
asp.netcharacter-encodingajaxcontroltoolkitwebmethod

Show special chars like é in AutoComplete


How do I show special chars like é in Ajax Control Toolkit's AutoComplete? They're showing as a white square in IE7 and a black diamond in FF4. I tried escaping them in the WebMethod using HttpUtility.HtmlEncode but that made it worse!

(Also raised here http://ajaxcontroltoolkit.codeplex.com/workitem/26998)


Solution

  • When reading the values in from file, use

    StreamReader re = new StreamReader(filepath,System.Text.Encoding.UTF7);
    

    rather than

    StreamReader re = new StreamReader(filepath);