{
  "schemaVersion": 1,
  "id": "texto-decodificando-entidades-html-en-android",
  "language": "en",
  "canonical": "https://paynalton.tech/en/works/decodificando-entidades-html-en-android/",
  "title": "Decoding HTML Entities in Android",
  "summary": "Solution for decoding HTML entities in Android.",
  "author": "Paynalton",
  "format": "technical",
  "year": 2013,
  "source": "https://paynalton.blogspot.com/2013/05/decodificando-entidades-html-en-android.html",
  "partial": false,
  "topics": [
    {
      "title": "Technical texts",
      "url": "https://paynalton.tech/en/topics/lectura-categoria-tecnicos/"
    },
    {
      "title": "Technical text",
      "url": "https://paynalton.tech/en/topics/lectura-texto-tecnico/"
    },
    {
      "title": "Technical note",
      "url": "https://paynalton.tech/en/topics/lectura-nota-tecnica/"
    },
    {
      "title": "Programming",
      "url": "https://paynalton.tech/en/topics/lectura-programacion/"
    },
    {
      "title": "Android",
      "url": "https://paynalton.tech/en/topics/lectura-android/"
    }
  ],
  "body": "A few moments ago, I encountered the following problem.<br><br>An Android application receives a string from a server on the internet with accents encoded using [htmlentities](http://php.net/manual/es/function.htmlentities.php). The result was something like this in the application:<br><br>\n\n> Magnífica oportunidad\n\nThe solution was to use [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>And the result was:<br><br>\n\n> Magnífica Oportunidad\n\nGood luck with your applications.\n"
}
