Reputation:
Why can't I replace " & # 3 9 ; " to single quote , I wrote this code but doesn't work.
Code
String originalText = "don't";
originalText = originalText.replace("'", "\'");
The result is showing dont
but I want it to be don't
I set spaces between & # 3 9 ; because if I remove it will hide.
Upvotes: 0
Views: 56
Reputation: 1675
Well if you have trouble converting the HTML ASCII's it's advisable to use,
Html.fromHtml("Don't");
Source:
Upvotes: 1