Skip to content
Paynalton
English
Search

Technical text

Decoding HTML Entities in Android

Solution for decoding HTML entities in Android.

Author: Paynalton

Published: 2013

Original publication

A few moments ago, I encountered the following problem.

An Android application receives a string from a server on the internet with accents encoded using htmlentities. The result was something like this in the application:

Magnífica oportunidad

The solution was to use html.fromHtml

String titulo=Html.fromHtml(cadenaDelServidor).toString();

And the result was:

Magnífica Oportunidad

Good luck with your applications.

Download formats

Search content

Search through published texts and narrow results by content type or topic.

Open Explore