Submit form with a different encoding

512 views Asked by At

I have a page which needs to redirect a user to another separate system (I have no access there). The system requires some parameters to be sent to it via POST (for example "userId"). The problem is, that my page is in UTF-8 and the other system's encoding is ISO-8859-1.

Also, it could take some time to process the request for the other system. That's why while the request is processing, user should be seeing some "Please wait, you are being processed by the system" in my page.

The best way how I'd like it to look is something like this:

  1. User opens page A and presses "Send me to System".
  2. User is shown a page with text "Please wait, you are being processed by the system". Also there's hidden POST form on the same page that is being posted after 1 second with Javascript.
  3. When the other server finishes processing the request, user finally receives the response and my text is replaced with a different page provided by the other server.

The problem is, I can not make a form as it will post the data in UTF-8 and the other server will try to parse it as ISO-8859-1.

What are the possible solutions?

Thanks in advance.

2

There are 2 answers

0
bezmax On BEST ANSWER

Managed to make it using iframes. Iframe can have it's personal encoding loaded.

2
Steve-o On

Easy, just make the form page only use ISO-8859-1 encoding.