cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Johnson" <>
Subject encoding problem for AJAX
Date Sun, 18 Dec 2005 01:38:22 GMT

I use tomcat to be cocoon's servlet container, the default encoding for 
tomcat is iso-8859-1, so I set the cocoon's container-encoding to iso-8859-1 
before, and form-encoding to UTF-8 for chinese input, everything good.

But I found AJAX's encoding is UTF-8, see 
req.setRequestHeader("Content-Type", "application/x-www-form-urlencoded; 
charset=UTF-8");  in cform.js, so the container-encoding must set to UTF-8 
otherwise the encoding for chinese font will wrong.

But if I use a none-AJAX browser, It's wrong now.

So If I want to use right encoding both in AJAX and non-AJAX for chinese 
font, I change req.setRequestHeader("Content-Type", 
"application/x-www-form-urlencoded; charset=ISO-8859-1");  in cform.js and 
set container-encoding to ISO-8859-1 and than everything right.

So I suggest to change the encoding in cform.js from UTF-8 to ISO-8859-1.

Best regards


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message