0

I have a textview where I have to display some html greek letters

Something like this(without the spaces):

& epsilon;& phi;& alpha;& rho;

My problem is that the letter & phi; is not showing at all. Every other letter works fine but this doesn't come up. It's just a space. And I'm sure that is spelled correct because on println works fine and also when a paste here the letter it showed fine. I'm using the Html.toHtml() function. Any ideas?

1 Answer 1

3

First, I presume that you mean Html.fromHtml(), as Html.toHtml() takes a Spanned and creates HTML from it.

Second, Html.fromHtml() does not do anything itself with entity references. It may be that the underlying TagSoup parser, which handles parsing HTML, is doing something with some of the entity references but not all. Note that Android's edition of TagSoup may not be the same as the current one on the TagSoup site.

You might try the Unicode entity equivalent, to see if that helps.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.