Encoding & xmlhttp object
showing garbage character in asp.net page, when special character ñ (Alt+164) is enter along with name.
this is extract of code that is causing problem:
Response.ContentType = "text/xml"
.............
.............
dim strFrom as string = "Johnñ"
Me.Response.AddHeader("from", strFrom)
.............
.............
" document.all." & Me.UniqueID.ToString & "_LblFrom.innerHTML='<B>From:</B> ' + " & "oXMLHTTP.getResponseHeader('from')" & vbNewLine
I know I have to convert it to different encoding or charset, I tried, it didnt work and not sure, please help.
Thanks.
|