Hey all,

 

Anyone got some quick advice on international character submission via Prototype’s Form.Serialize? 

 

The base scenario:

I set the charset on my page to ISO-8859-1, which seems to be what everyone uses.  If I submit a regular form with a standard webpage, I get international characters (like an accented “e”, or and AE legature) encoded as 1-byte ascii code values.

 

The problem scenario:

When I submit the same thing with Prototype over XMLHttpReq with the parameter set to a Form.Serialize of some form, I get that same character encoded in what looks like its 2-byte Unicode representation.

 

The real question:

Basically it boils down to the built-in encodeUrlComponent returning 2-byte encodings, while the browser seems to do a 1-byte encoding.  My server isn’t handling the 2-byte encoding correctly.  It seems weird to me that the two methods would produce differing results.  Am I doing something wrong?

 
Thanks again for any tips!
 
Rahul
 
_______________________________________________
Rails-spinoffs mailing list
Rails-spinoffs@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs

Reply via email to