Request.Form returns wrong results

  • Thread starter Thread starter steen maigaard
  • Start date Start date
S

steen maigaard

Hi.

I have an ASP page sending form results to an ASPX page. All is well until i
use Danish characters, then i get wrong characters.
I use Request.Form["fieldname"] to retrieve the fields.
If i do the same from an ASP page then it works fine.

What do i have to do to fix this?

Regards STeen
 
Hi Patrice.

Both pages are in the same virtual directory so the should be running under
same conditions.

Regards Steen



Patrice said:
This is likely an encoding issue. Make sure you use the same encoding on
both sites (utf8 ?)

--
Patrice

steen maigaard said:
Hi.

I have an ASP page sending form results to an ASPX page. All is well
until i use Danish characters, then i get wrong characters.
I use Request.Form["fieldname"] to retrieve the fields.
If i do the same from an ASP page then it works fine.

What do i have to do to fix this?

Regards STeen
 
Hi Patrice.

I found it, in the information server You have to set encoding for request
and response, then it works.

Thanks for the help

Regards Steen

Patrice said:
AFAIK not enough, the encoding is defined in web.config for an ASP.NET
application. It uses Response.Charset (if I remember) in classic ASP. Keep
in mind that ASP.NET and ASP are ruijngn on two differents "engine".

A start could be to check what is the encoding reporting by your browser
(for IE you can click on the page and see the encoding selected by IE) and
see if they the same on both pages...

The default is likely 8859 for ASP classic and utf8 for ASP.NET...

Or use a tool such as Fiddler and see which charset is used in both
cases...

--
Patrice

steen maigaard said:
Hi Patrice.

Both pages are in the same virtual directory so the should be running
under same conditions.

Regards Steen



Patrice said:
This is likely an encoding issue. Make sure you use the same encoding on
both sites (utf8 ?)

--
Patrice

"steen maigaard" <[email protected]> a écrit dans le message de groupe
de discussion : #[email protected]...
Hi.

I have an ASP page sending form results to an ASPX page. All is well
until i use Danish characters, then i get wrong characters.
I use Request.Form["fieldname"] to retrieve the fields.
If i do the same from an ASP page then it works fine.

What do i have to do to fix this?

Regards STeen
 
Back
Top