Prototype has _nothing_ to do with the response code.
Your backend is sending the wrong encoding. Problably, you have not
set the correct send headers.
Are you using a PHP backend? If yes, maybe your local php.ini have
default_charset set to utf-8 and the unix one has not, by default, php
uses iso-8859-1.
Try adding this line to you response:
header('content-type:text/plain; charset=utf-8'); // of course, the
content-type you are expecting
or use [1]utf8_encode(CONTENT) before send the response.
[1] http://www.php.net/utf8-encode
~ Cheers
On Wed, Jul 15, 2009 at 1:00 PM, husky<[email protected]> wrote:
>
> hihi all,
>
> i am using Ajax.request() function to call and return results on a web
> page and i noticed that depending on where the server is deployed, the
> encoding of the response changes.
>
> if i am running the code locally on my windows machine, the Ajax
> response encoding is UTF-8. but when deployed to a unix server, the
> Ajax response encoding is ISO-8859-1.
>
> the side-effect is that the response contains unreadable characters
> because it's in the wrong encoding (should be UTF-8, but it's
> ISO-8859-1)
>
> does anyone know why this happens and how to fix this?
>
> thanks in advance!
> -h
>
> >
>
--
Believe nothing, no matter where you read it, or who said it, no
matter if I have said it, unless it agrees with your own reason and
your own common sense.
--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
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
-~----------~----~----~----~------~----~------~--~---