[jQuery] Re: Foreign charachters in .post()

2010-01-12 Thread youradds
Mmm, well the page type is: Not sure what the DB is (its a mySQL DB) ... and I'm sure thats ok, cos if I convert the charachters via a few lines of perl code, then it works fine... I think I'm just gonna have to admit defeat, and just use the perl code I worked out the other day - not the ideal

Re: [jQuery] Re: Foreign charachters in .post()

2010-01-12 Thread Jonathan Vanherpe (T & T NV)
I'm not sure what else there is, I never change character sets and set everything to UTF-8 just to avoid the mess you're having. The only advice I can give you is to make sure everything's set to the same character set (your html, your js, your database, your php source files, ...) Then try

[jQuery] Re: Foreign charachters in .post()

2010-01-12 Thread youradds
Mmm, changing to that works - but the error is still there with the unlat charachters :( On Jan 12, 12:40 pm, "Jonathan Vanherpe (T & T NV)" wrote: > maybe it's because of the application/json part. I guess that should be > application/x-www-form-urlencoded or something. Just play with the > opti

Re: [jQuery] Re: Foreign charachters in .post()

2010-01-12 Thread Jonathan Vanherpe (T & T NV)
maybe it's because of the application/json part. I guess that should be application/x-www-form-urlencoded or something. Just play with the options you find here: http://docs.jquery.com/Ajax/jQuery.ajaxSetup Jonathan youradds wrote: Mmm, maybe that didn't work :/ jQuery.ajax

[jQuery] Re: Foreign charachters in .post()

2010-01-12 Thread youradds
Hi, Was there mean't to be a reply here? =) Cheers Andy On Jan 12, 12:24 pm, Andreas Möller wrote: >

Re: [jQuery] Re: Foreign charachters in .post()

2010-01-12 Thread Andreas Möller

[jQuery] Re: Foreign charachters in .post()

2010-01-12 Thread youradds
Mmm, maybe that didn't work :/ jQuery.ajaxSetup({ scriptCharset: "ISO-8859-1" , contentType: "application/json; charset=ISO-8859-1"}); jQuery.post("/cgi-bin/unterricht/review.cgi", { Review_Rating: the_rating, ID: theID,

[jQuery] Re: Foreign charachters in .post()

2010-01-11 Thread youradds
You star - that works a charm :) Thanks! Andy On Jan 11, 3:54 pm, "Jonathan Vanherpe (T & T NV)" wrote: > actually, putting this once somewhere in your script should fix it: > $.ajaxSetup({ scriptCharset: "ISO-8859-1" , contentType: > "application/json; charset=ISO-8859-1"}); > > but still, you

Re: [jQuery] Re: Foreign charachters in .post()

2010-01-11 Thread Jonathan Vanherpe (T & T NV)
actually, putting this once somewhere in your script should fix it: $.ajaxSetup({ scriptCharset: "ISO-8859-1" , contentType: "application/json; charset=ISO-8859-1"}); but still, you'll make your life easier if you just go for a completely utf-8 workflow. Jonathan Jonathan Vanherpe (T & T N

Re: [jQuery] Re: Foreign charachters in .post()

2010-01-11 Thread Jonathan Vanherpe (T & T NV)
this seems to answer your question somewhat: http://stackoverflow.com/questions/26620/how-to-set-encoding-in-getjson-jquery although I'd personally recommend to just use utf-8 for everything (so making your website and database use utf-8) Jonathan youradds wrote: Anyone got any suggestions?

[jQuery] Re: Foreign charachters in .post()

2010-01-11 Thread youradds
Anyone got any suggestions? This is the last bug I've gotta squish :/ TIA Andy On Jan 11, 9:18 am, youradds wrote: > I found a way to do this in the .cgi script - but obviously I'd prefer > to do it vai the AJAX submission, instead of having to encode it > properly at the server end :) > >    

[jQuery] Re: Foreign charachters in .post()

2010-01-11 Thread youradds
I found a way to do this in the .cgi script - but obviously I'd prefer to do it vai the AJAX submission, instead of having to encode it properly at the server end :) my $contents = $IN->param('Review_Contents'); $contents =~ s/([\200-\377]+)/from_utf8({ -string => $1, - charset => '