Decode HTML entities in android

前端 未结 5 2015
臣服心动
臣服心动 2020-11-28 06:38

I need to decode HTML entities, e.g. from ö to ö, and & to &.

URLEncoder.decode(str) does not do the job (convert from % notat

5条回答
  •  醉话见心
    2020-11-28 07:09

    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.

提交回复
热议问题