Re: [jQuery] does jQuery has support for parameter handling ?
Mark Gibson schrieb: In PHP have a look at: utf8_encode(), iconv, or mbstring - Mark I think i haven't clearly told my problem: I just have some article manager where for each article i have some description text (german english). At the moment i have one php file loading the text from the database and pass it to my article manager. Here i just want to send strings like Diesen Artikel würde viel kosten for example (auml;). If i do this without any encoding the strings get damaged and looks strange because of the way urls are interpreted. So i thought i must urlencode/urldecode it, as long as i urldecode/urlencode all in php it's working. Hope this is a better view of my problem best regards, Truppe Steven ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] does jQuery has support for parameter handling ?
Truppe Steven wrote: Mark Gibson schrieb: In PHP have a look at: utf8_encode(), iconv, or mbstring I think i haven't clearly told my problem: I just have some article manager where for each article i have some description text (german english). At the moment i have one php file loading the text from the database and pass it to my article manager. Here i just want to send strings like Diesen Artikel würde viel kosten for example (auml;). If i do this without any encoding the strings get damaged and looks strange because of the way urls are interpreted. So i thought i must urlencode/urldecode it, as long as i urldecode/urlencode all in php it's working. I'm still a bit confused, but I guess you are trying to pass data from PHP to Javascript, and this data may contain character outside the ASCII character set. Javascript works with the Unicode, and your data is probably in ISO-8859-1. In this case I would suggest converting the data using PHP utf8_encode() and pass it in a JSON serialized string. URI's are absolutely useless for this kind of thing. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] does jQuery has support for parameter handling ?
Hello everyone, i have the following problem: i want to pass a string that is encoded with the php urlencode() function via json to some javascript code. does javascript or jQuery support any way to decode such a string ? Another point: Does jQuery support any sort of URL parameter handling ? best regards, Truppe Steven ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] does jQuery has support for parameter handling ?
Mark Gibson schrieb: Javascript has the functions: decodeURI(s) and decodeURIComponent(s) I get a string like this: Stumpf+einer+Palme%2C+ausgeh%F6hlt%2C+geschliffen+und+mit+Perlmutteinlegearbeiten+verziert If this string is inside the variable test and i do: var newtest = decodeURIComponent(test); I get the error malformed URI sequence. I've looked documentation on http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference but there i don't see much about that function... Thanks for the fast reply! What am i doing wrong ? best regards, Truppe Steven ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] does jQuery has support for parameter handling ?
Does decodeURIComponent() support character encoding character sequences? %F6 looks like an accented character, if you remove this does it work? That might give you a clue to the problem or what to search for. -Steve Truppe Steven wrote: Mark Gibson schrieb: Javascript has the functions: decodeURI(s) and decodeURIComponent(s) I get a string like this: Stumpf+einer+Palme%2C+ausgeh%F6hlt%2C+geschliffen+und+mit+Perlmutteinlegearbeiten+verziert If this string is inside the variable test and i do: var newtest = decodeURIComponent(test); I get the error malformed URI sequence. I've looked documentation on http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference but there i don't see much about that function... Thanks for the fast reply! What am i doing wrong ? best regards, Truppe Steven ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] does jQuery has support for parameter handling ?
escape() and unescape() have always worked for me :-) i.e. escape('The quick brown fox') - The%20quick%20brown%20fox unescape('The%20quick%20brown%20fox') - The quick brown fox Luke Truppe Steven wrote: Mark Gibson schrieb: Javascript has the functions: decodeURI(s) and decodeURIComponent(s) I get a string like this: Stumpf+einer+Palme%2C+ausgeh%F6hlt%2C+geschliffen+und+mit+Perlmutteinlegearbeiten+verziert If this string is inside the variable test and i do: var newtest = decodeURIComponent(test); I get the error malformed URI sequence. I've looked documentation on http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference but there i don't see much about that function... Thanks for the fast reply! What am i doing wrong ? best regards, Truppe Steven ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ -- zinc Roe Design www.zincroe.com (647) 477-6016 ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/