accent and Request.Form

  • Thread starter Thread starter franz
  • Start date Start date
F

franz

i have an html page that send datas from a form to an aspx page.

when, in aspx page, i take the value with Request.Form.Item("Nome") i
can't get the accents.

let's say, if i type the string "pietà", when i get it in the aspx
page i see "piet"

does anybody knows how can i fix this?

thanks
francesco
 
Does it make a difference if you use HtmlDecode?

label1.text = Server.HtmlDecode(Request.Form.Item("Nome"))

Ken
Microsoft MVP [ASP.NET]


i have an html page that send datas from a form to an aspx page.

when, in aspx page, i take the value with Request.Form.Item("Nome") i
can't get the accents.

let's say, if i type the string "pietà", when i get it in the aspx
page i see "piet"

does anybody knows how can i fix this?

thanks
francesco
 
Thus wrote Franz,
i have an html page that send datas from a form to an aspx page.

when, in aspx page, i take the value with Request.Form.Item("Nome") i
can't get the accents.

let's say, if i type the string "pietà", when i get it in the aspx
page i see "piet"

does anybody knows how can i fix this?

The client is using the wrong request encoding. Insert
<meta id="Meta" runat="server" http-equiv="content-type" content="text/html;
charset=UTF-8" />
in the <head /> of your HTML form.

Cheers,
 
thnaks for your help!
Joerg, i don't know why, but the code as you posted me does't look to
work.
To make it works i have to type this string.

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

thanks
francesco
 
Thus wrote Franz,
thnaks for your help!
Joerg, i don't know why, but the code as you posted me does't look to
work.
To make it works i have to type this string.
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

I know why... I accidentally grabbed a server-side HTML Meta control from
one of my samples. It should have been exactly the text you've posted.

Cheers,
 
Back
Top