why don't you use urlencode php function ? http://fr2.php.net/manual/en/function.urlencode.php