I want to convert a java string that contains UTF-8 characters to a format that a browser can use( the string will be used as URL )
What exactly I mean is that url.openStream() cannot open a webpage, when url contains Persian letters.
I want to convert a java string that contains UTF-8 characters to a format
Share
Java
Strings do not contain UTF-8 characters. From the docs for Character:You can use the URLEncoder class to encode a string so that
url.openStream()works.