I'm getting stuck with an issue to convert a string into url. The problem is the string containing some special symbols like &, | , -, # etc. I try to use different encoding methods on it but unable to convert it into url. I try to encode string that return a valid string like the symbols converted into %a etc. but again when I try to convert this encoded string to url getting same string (with special character) in return.
I have shared a sample string. Please let me know what encoding or conversion method i can use to convert this string into url.
Sample String: http://qc.singlevendor.4livedemo.com/yokart/product/image/176/176|11|133|/330-440-webp?t=1623042841
Note: If I paste the same url in browser it apply an encoding method on url and open the correct image
Thanks in advance