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!
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!