Encoding problem when posting using JavaScript

G

Guest

Hi,

I have a problem concerning encoding when posting a form. The form (a
textbox and a button) is posted using JavaScript and a
window.location("http://therecieverofthedata").

The website have to be encoded in utf-8 (in my web.config I have
<globalization requestEncoding="utf-8" responseEncoding="utf-8" />), but the
reciever of the posted data have to get the data encoded in ISO-8859-1.

The encoding works fine when the user enters text and then clicks the
button. The reciever then gets the posted data in ISO-8859-1. The problem
occurs when the user enters text and the presses enter - then the posted data
is utf-8 encoded!

I have tried to encode the data in the JavaScript both using
window.encodeURI and document.myform.encoding = "ISO-8859-1" but it makes no
difference. I have also tried to do a "manual" encoding, i.e. translate the
characters from one encoding to the other, but it makes no difference - the
data keeps turning up utf-8-encoded no matter what!

Please help me!
 

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

No members online now.

Forum statistics

Threads
473,792
Messages
2,569,639
Members
45,353
Latest member
RogerDoger

Latest Threads

Top