non-Ascii characters not represented properly in TextBox or output to Wordpad RRS feed

  • Question

  • When debugging my ASP.Net application I can see that I am assigning this string to a variable: "<City>Paris La Défense Cedex</City>"  The first e in Defense has an accent over it and is Decimal 233.

    If I pass the variable (strS7FileXML) to a Textbox or to these lines of code:


                Response.BufferOutput = True

                Response.ContentType = "Text/xml" '"Text/html" '"Text/xml"

                Response.AppendHeader("Content-Disposition", "attachment; filename=" + strS7FileName)

                Response.ContentEncoding = System.Text.Encoding.UTF8


                mstrFileType = "S7"


    It opens in WordPad or shows in the textbox as "<City>Paris La Défense Cedex</City" or the accented e is represented as a "?" in a diamond.  How can I get the string to represented properly, with the accented e?



    • Moved by Karel ZikmundMicrosoft employee Thursday, October 20, 2011 12:41 AM Try http://forums.asp.net (From:Building Development and Diagnostic Tools for .Net)
    Monday, October 17, 2011 3:40 PM


All replies