Ohhh -- that makes quite a lot of sense if you think about it.

serialize() uses encodeURIComponent() under the hood, and the spec  
says that it will always encode the string as UTF-8, regardless of  
source. I'm not sure what your options are if you're doing a form  
submission, other than recognizing the content-type on the server and  
using iconv or another conversion utility to make it match your  


On Apr 28, 2009, at 10:52 AM, Miguel Beltran R. wrote:

> You use forms?
> I tried use iso-8859-1 and forms and I have much trouble. The  
> function serialize fields always give back data using utf-8.
> If not use forms, try adding option encoding
> 2009/4/23 Diodeus <diod...@gmail.com>
> I'm working on and English/French site. The French data is in the
> windows-1251 character set.
> My main application uses:
> <meta http-equiv="Content-Type" content="text/html;
> charset=windows-1252"/>
> So I am also adding the appropriate HTTP response header in my AJAX
> response. If I go to the AJAX URL directly, the encoding comes out
> fine, but if I call it via Prototype the accented French characters
> come out as the <?> diamond in Firefox.
> I've tried adding encoding:'windows-1252' in my request, but I'm still
> getting the same result.
> Does Prototype need some other configuration to treat the response as
> something other than UTF-8?

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 
For more options, visit this group at 

Reply via email to