Loading

Monday, August 15, 2011

Encodes characters in the given string as '%'-escaped octets using the UTF-8 scheme

The android.net.Uri class provide a method encode() to encode characters in the given string as '%'-escaped octets using the UTF-8 scheme. Leaves letters ("A-Z", "a-z"), numbers ("0-9"), and unreserved characters ("_-!.~'()*") intact. Encodes all other characters.



example:

        String src = "ABC def";

String dest = Uri.encode(src);





It convert "ABC def" to "ABC%20def"


SHARE TWEET

Thank you for reading this article Encodes characters in the given string as '%'-escaped octets using the UTF-8 scheme With URL http://x-tutorials.blogspot.com/2011/08/encodes-characters-in-given-string-as.html. Also a time to read the other articles.

0 comments:

Write your comment for this article Encodes characters in the given string as '%'-escaped octets using the UTF-8 scheme above!