[Proto-Scripty] Re: Ajax response encoding type changing depending on windows (UTF-8) vs unix (ISO-8859-1)

2009-07-16 Thread husky

unfortunately it didn't work.

i set:

AddDefaultCharset utf-8

to the Apache conf file (under the virtualhost section) and restarted
Apache, but it is still returning ISO-8859-1 encoding when calling
Ajax.

any other ideas?

-h

On Jul 15, 2:25 pm, yuval dagan dag...@gmail.com wrote:
 hi

 I had a similar problem when I moved to apache2 on ubuntu from win 2000
 server.
  try to add the line

 AddDefaultCharset Off

 to the site virtual directory
 thats because in the new linux apache2 versions, the conf file is seperate
 to many files and in one of them which its name is 'cahrset' if I remember
 correct it sets a default charset for all sites in that apache2 server.

 hope it helped

 Yuval

 On Wed, Jul 15, 2009 at 8:09 PM, husky victor.at.rog...@gmail.com wrote:

  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, huskyvictor.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
-~--~~~~--~~--~--~---



[Proto-Scripty] Re: Ajax response encoding type changing depending on windows (UTF-8) vs unix (ISO-8859-1)

2009-07-15 Thread Douglas

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, huskyvictor.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
-~--~~~~--~~--~--~---



[Proto-Scripty] Re: Ajax response encoding type changing depending on windows (UTF-8) vs unix (ISO-8859-1)

2009-07-15 Thread yuval dagan
hi

I had a similar problem when I moved to apache2 on ubuntu from win 2000
server.
 try to add the line

AddDefaultCharset Off

to the site virtual directory
thats because in the new linux apache2 versions, the conf file is seperate
to many files and in one of them which its name is 'cahrset' if I remember
correct it sets a default charset for all sites in that apache2 server.

hope it helped

Yuval
On Wed, Jul 15, 2009 at 8:09 PM, husky victor.at.rog...@gmail.com wrote:


 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, huskyvictor.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
-~--~~~~--~~--~--~---



[Proto-Scripty] Re: Ajax response encoding type changing depending on windows (UTF-8) vs unix (ISO-8859-1)

2009-07-15 Thread husky

That is a possibility!  There is an Apache server sitting in front of
the WebLogic server.

Thank you for this, I think this should be the cause of the encoding
problem (I hope anyway)!

Best regards,
-h



On Jul 15, 2:25 pm, yuval dagan dag...@gmail.com wrote:
 hi

 I had a similar problem when I moved to apache2 on ubuntu from win 2000
 server.
  try to add the line

 AddDefaultCharset Off

 to the site virtual directory
 thats because in the new linux apache2 versions, the conf file is seperate
 to many files and in one of them which its name is 'cahrset' if I remember
 correct it sets a default charset for all sites in that apache2 server.

 hope it helped

 Yuval

 On Wed, Jul 15, 2009 at 8:09 PM, husky victor.at.rog...@gmail.com wrote:

  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, huskyvictor.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
-~--~~~~--~~--~--~---