Hi Mr T.J. Crowder
Thanks for your reply and all the help.
Well I have checked the Prototype Js file code and found the :-
Ajax.Base = Class.create({
initialize: function(options) {
this.options = {
method: 'post',
asynchronous: true,
contentType: 'application/x-www-form-urlencoded',
encoding: 'UTF-8',
parameters: '',
evalJSON: true,
evalJS: true
};
Here the Ajax options are being set and we can see that encoding is
given UTF-8.
Now what should I put in the encoding parameter instead of UTF-8 which
allows the character like 'ñ'.
I have tried the ISO-8859, but the result is same.
Anu guidance here will be great help.
Thanks again
Harpreet
On Jun 3, 3:06 pm, "T.J. Crowder" <[EMAIL PROTECTED]> wrote:
> 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- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---