Request.Form returns wrong results

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
 
S

steen maigaard

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
 
S

steen maigaard

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top