That assumes that strobj is not already encoded and that all characters in the string are encode safe. For example, if you did what you suggest on the the OPs URL you will get an invalid result because the ? will be quoted.
URL quoting is well defined, the status of the string that you are trying to quote and the level of quoting that the server that you are trying to connect to requires are not.
Last edited by kovidgoyal; 08-27-2012 at 03:56 PM.
|