{
  "schemaVersion": 1,
  "id": "texto-decodificando-entidades-html-en-android",
  "language": "es",
  "canonical": "https://paynalton.tech/es/obra/decodificando-entidades-html-en-android/",
  "title": "Decodificando Entidades HTML en android",
  "summary": "Solución de decodificación de entidades HTML en Android.",
  "author": "Paynalton",
  "format": "technical",
  "year": 2013,
  "source": "https://paynalton.blogspot.com/2013/05/decodificando-entidades-html-en-android.html",
  "partial": false,
  "topics": [
    {
      "title": "Textos técnicos",
      "url": "https://paynalton.tech/es/temas/lectura-categoria-tecnicos/"
    },
    {
      "title": "Texto técnico",
      "url": "https://paynalton.tech/es/temas/lectura-texto-tecnico/"
    },
    {
      "title": "Nota técnica",
      "url": "https://paynalton.tech/es/temas/lectura-nota-tecnica/"
    },
    {
      "title": "Programación",
      "url": "https://paynalton.tech/es/temas/lectura-programacion/"
    },
    {
      "title": "Android",
      "url": "https://paynalton.tech/es/temas/lectura-android/"
    }
  ],
  "body": "Hace unos momentos se me presentó la siguiente dificultad.<br><br>Una aplicación Android recibe una cadena desde un servidor en internet con acentos codificados con [htmlentities](http://php.net/manual/es/function.htmlentities.php). El resultado era algo así en la aplicación:<br><br>\n\n> Magnífica oportunidad\n\nLa solución fue utilizar [html.fromHtml](http://developer.android.com/reference/android/text/Html.html#fromHtml(java.lang.String))<br><br>String titulo=Html.fromHtml(cadenaDelServidor).toString();<br><br>Y el resultado fue:<br><br>\n\n> Magnífica Oportunidad\n\nSuerte con sus aplicaciones.\n"
}
