Skip to Content
0
Former Member
Aug 14, 2008 at 09:34 AM

How to encode a comma in a url

1625 Views

I am working on a par file in which i have encoded a string for special characters before it is stored in the cookie and it is decode when read from it.Code used is as follows:-

strEncodeURL =URLEncoder.encode(strLocation,"UTF-8");

strDecodeURL = URLDecoder.decode(strLocation);

now i need to encode strlocation for comma(,),fullstop(.),semicolon(;).

The string strLocation stores a value that is fetched from from SRM using a function module .

If using %2cstrLocation will help for encoding comma(,)?As we use %2c for comma(,).