A
Abe Simpson
Hi all,
My form file has this attribute:
<META http-equiv="Content-Type" content="text/html; charset=utf-8">
The form's action points to an .aspx file where I try to retrieve field
values as follows:
txtTextBox.Text = Request["fieldname"];
However this seems to return a UTF-8 encoded string. In classic ASP, if
would return Unicode, so that I would say
Response.Write( Server.HtmlEncode( Request("fieldname") ) ) and that would
return plain ASCII text (all those Ӓ things).
In ASP.NET, however, Server.HtmlEncode does not seem to do anything at all,
I still get UTF-8, and I need plain ASCII!
How do I convert UTF-8 to plain Unicode (UTF-16) and then to plain ASCII?
Thanks in advance.
-- Abe
My form file has this attribute:
<META http-equiv="Content-Type" content="text/html; charset=utf-8">
The form's action points to an .aspx file where I try to retrieve field
values as follows:
txtTextBox.Text = Request["fieldname"];
However this seems to return a UTF-8 encoded string. In classic ASP, if
would return Unicode, so that I would say
Response.Write( Server.HtmlEncode( Request("fieldname") ) ) and that would
return plain ASCII text (all those Ӓ things).
In ASP.NET, however, Server.HtmlEncode does not seem to do anything at all,
I still get UTF-8, and I need plain ASCII!
How do I convert UTF-8 to plain Unicode (UTF-16) and then to plain ASCII?
Thanks in advance.
-- Abe