On 3/29/07, Christophe Porteneuve <[EMAIL PROTECTED]> wrote:
>
>
> For POST, you can indeed use Latin1, so long as you:
>
>    (a) do set the encoding option so your server side isn't confused
>    (b) do not rely on Hash.toQueryString, which will use
>        encodeURLComponent, which by necessity will use UTF-8 (as it
>        is intended to encode *URL* components).  So you should manually
>        define your POST body, and put is as one string in the postBody
>        option.


You can also overwrite encodeURLComponent like this:

function encodeURLComponent(component) {
  //-> your own encoding logic ...
}

Put this into the global scope. However, I don't recommend this. It's best
that you use iconv on the server side:

<?php
$params_to_iconv = array('name', 'surname');
foreach ($params_to_iconv as $param)
   $_POST[$param] = iconv("UTF-8", "ISO-8859-1", $_POST[$param]);
?>

You don't have to change existing code; just add this somewhere on the top.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to