Hi,
Probably this is a mismatch of the character set used in your page, in
the request, and/or on your server. As I understand it, by default
HTTP requests use ISO-8859-1, not Unicode. [1] ISO-8859-1 (aka
"latin1") correctly allows for the 'ñ' ("enya") [2] and so provided
you're sending the correct character (it's a single eight-bit value),
you should be fine. I'd check the encoding of the page itself, check
to see whether the server is applying some other character set instead
of ISO-8859-1 (which it shouldn't be unless you're specifying the
charset header in the request), etc., etc.
[1] http://tools.ietf.org/html/rfc2616#page-21
[2] http://en.wikipedia.org/wiki/ISO/IEC_8859-1
FWIW...
--
T.J. Crowder
tj / crowder software / com
On Jun 3, 10:12 am, Harpreet <[EMAIL PROTECTED]> wrote:
> Hi
>
> I need some help. I am posting unicode character in the AJAX request.
> I am writing following code:-
>
> var pars =
> 'cmd=contact.view&mode=getContactData&name='+encodeURIComponent('moñ');
> var myAjax = new Ajax.Request(
> url,
> {
> method: 'post',
> parameters: pars,
> onComplete: processFunction
> });
>
> now here a special character exists i.e ñ. The problem is that when
> Ajax request is posted, the ñ character automatically get converted to
> ñ (on server side) which gives some wrong result in my server side
> function.
>
> I am very surprised that how the ñ automatically get converted to ñ.
>
> Please help me in this matter
>
> Harpreet
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Spinoffs" 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/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---