Hi,

I'm using prototype 1.6.0.2.

My page is generated by a cgi-bin program (a dll) on a IIS server.
It is encoded in "Windows-1252" charset.
Users may both use Internet Explorer 6 or Mozilla Firefox browsers.

The page uses the Ajax.Request object in order to send a request to
the dll :

new Ajax.Request( "http://myUpfrontserver/cognos/cgi-bin/
upfisapi.dll", {
  method: 'post',
  parameters: {xmlcmd: "<DescribeNewsBox><ID>123443435454534</ID></
DescribeNewsBox>"},
  encoding: ''Windows-1252',
  contentType: "application/x-www-form-urlencoded",
  onSuccess: function(transport) {
    /*
     My treatment on transport.responseXML or transport.responseText
    */
  }
 });

The server returns an xml message supposed to be encoded in
"Windows-1252" charset.

But it seems the transport response is interpreted as encoded in UTF-8
charset...
Actually, some accented character and their related characters appear
with a ?
i.e; : aï" >  becomes a?>       (this is the U+FFFD character, which
appears in a dark square on Firefox, and as ? on IE6)

If I directly use the XMLHttpRequest object, I do not have this kind
of problem on Firefox (the problem persists with IE6) : the
responseText content is well detected in Windows-1252 charset.

Do you know if the Ajax objects enforces the response to be detected
as encoded in UTF-8?
Is there any way to change this?

I tried to analyze the prototype script in order to find where, in the
Ajax class, the responseText could be encoded in UTF-8 but I could not
find it... Anyway, I found that as the load was not completed, my
responseText was correctly interpreted (accented characters appear
correctly), and it is only at the end of the load when the status is
complete, that the U+FFFD Unicode characters appear.

Moreover, with IE6, I meet this problem by using both Ajax.Request or
XMLHttpRequest...
Is there a way to enforce encoding of the XMLHttpRequest response ?

Thanks for your help.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to