Hi Rahul,
Prototype uses UTF-8 encoding only. I would change your page charset to
UTF-8 from ISO-8859, this will definitively the best solution and once
for ever (UTF-8, that is Unicode covers all characters on our planet!)
Best regards
JAnko
Rahul Bhargava wrote:
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