开发者

httpwebresponse special characters

开发者 https://www.devze.com 2023-04-05 09:48 出处:网络
This is on pocket pc. I\'m using httpwebrequest to connect to a classic asp page to send and receive requests/responses. It was working fine all these years for almost 8 years, but now there are some

This is on pocket pc. I'm using httpwebrequest to connect to a classic asp page to send and receive requests/responses. It was working fine all these years for almost 8 years, but now there are some special characters like "Tokaji Aszú Apple", note the 'u' is different. The response replaces 'ú' with '?'. I need to have it as-is.

I verified it with a test.asp page开发者_高级运维 and browsed it from browser, it displays correctly.

<%
response.write "Tokaji Aszú Apple/ Fuji"
%>

but when I call the same page using httpwebrequest the response has '?' instead of 'ú'.

Not sure where to begin.


Because it's old Asp try this one

ASP CODE:

Response.ContentType = "text/html"
Response.AddHeader "Content-Type", "text/html;charset=UTF-8"
Response.CodePage = 65001
Response.CharSet = "UTF-8"

and the following HTML META tag:


Try to put UTF8 encoding to content Response.ContentEncoding = System.Text.Encoding.UTF8


Try this one Response.Charset = "UTF-8";

0

精彩评论

暂无评论...
验证码 换一张
取 消