I am using WebLogic in my java web app and in my code, I'm already
setting the following:

response.setContentType("text/html; charset=UTF-8");

Also, I noticed that the correct UTF-8 is being returned (in the
response headers) when I am requesting all the other JSP pages because
I added the following to the top of every JSP:

<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>

This problem of getting the wrong encoding type (ISO-8559-1) only
seems to happen for the Ajax.request() call, and only when on a unix
server.

Any ideas?



On Jul 15, 12:23 pm, Douglas <douglas.gont...@gmail.com> wrote:
> 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<victor.at.rog...@gmail.com> 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 prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to