By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,531 Members | 2,219 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,531 IT Pros & Developers. It's quick & easy.

Encoding problem when posting using JavaScript

P: n/a

I have a problem concerning encoding when posting a form. The form (a
textbox and a button) is posted using JavaScript and a

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!
Jan 10 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.