I need to decode HTML entities, e.g. from ö to ö, and & to &.
URLEncoder.decode(str) does not do the job (convert from % notations). TextUtils has a HTMLencode, but not a HTMLdecode.
Are there any function for decoding HTML entities?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The Html class is supposed to do that, however it is said that everything is not supported. It always worked for me but I never had ö so I can’t tell for this one.
Try
Html.fromHtml(yourStr)to get the decoded string.