johboh johboh - 1 year ago 215
HTML Question

Decode HTML entities in android

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

does not do the job (convert from % notations). TextUtils has a HTMLencode, but not a HTMLdecode.

Are there any function for decoding HTML entities?

Answer Source

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.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download