德美元的机器人C $ÇHTML实体 [英] Decode HTML entities in android

查看:129
本文介绍了德美元的机器人C $ÇHTML实体的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要去code HTML实体,如从&安培;#246;以O和帐单与;到&安培;

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

URLEn coder.de code(STR)不会做的作业(由%符号转换)。文本实用程序有一个HTMLen code,但不是HTMLde code。

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

有什么功能HTML实体解码?

Are there any function for decoding HTML entities?

推荐答案

的Html类是应该做的,但它是说,不支持一切。它总是为我工作,但我从来没有Ø所以我不能告诉这一个。 尝试Html.fromHtml(yourStr),以获得去codeD字符串。

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.

这篇关于德美元的机器人C $ÇHTML实体的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆