Loading ...
Sorry, an error occurred while loading the content.

Page encoding & XMLHttpRequest

Expand Messages
  • gammal.json@mailnull.com
    Hello, First, I apologize if this is a bit off-topic, but I hope someone can help. I m having a problem with passing non-ASCII parameters using XMLHttpRequest.
    Message 1 of 1 , Dec 18, 2005
    View Source
    • 0 Attachment
      Hello,
      First, I apologize if this is a bit off-topic, but I hope someone can help.

      I'm having a problem with passing non-ASCII parameters using XMLHttpRequest. The encoding of the page where the request is made is windows-1256, however, parameters are encoded differently when sent to the server using XMLHttpRequest. I've tried using escape() & encodeURIComponent() on the parameters before adding them to the URL, but it didn't help. escape() returns a unicode string, while encodeURIComponent() uses some other multibyte encoding.

      Instead of using XMLHttpRequest, I tried submitting the parameters using a form on the same page, and they were indeed sent in the page encoding (windows-1256). It seems that XMLHttpRequest has to be instructed to do something (or may be not do?) when sending the parameters, but I wasn't able to find anything relevant in its methods so far...

      TIA,
      Mahmoud Al Gammal


      ----------
      This message was sent from a MailNull anti-spam account. You can get
      your free account and take control over your email by visiting the
      following URL.

      http://mailnull.com/
    Your message has been successfully submitted and would be delivered to recipients shortly.