you can also use the javascript escape function to urlencode the string.
That's usefull if the data is coming from a form :
<input type="button" onclick="document.location = 'myurl.php?name=' + escape(document.myform.mystring.value);">
but, in this case, it may be more simple to send data using POST method on a form 🙂
Voila.
G.