2017-11-13 3 views
0

laden Ich benutze JSON Api in meiner Wordpress-Website, um die Beiträge im JSON-Format zu erhalten. Und ich werde auch diese JSON-Antwort abrufen und in der String-Variable speichern. Ich verwende webview.loadData(html_value, "text/html", "UTF-8"); , um Daten in meine Webansicht zu laden. Aber es funktioniert nicht mit Escapezeichen in HTML-Inhalt. Es zeigt den Inhalt in unbekanntem Format an. Mein json respone istwie HTML-Inhalt mit Escape-Zeichen in webview

<p style=\"text-align: left;\"><strong>\u0c9f\u0c97\u0cb0\u0cc1, \u0cae\u0cc8\u0caf\u0cc6\u0cb2\u0ccd\u0cb2\u0cbe \u0caa\u0cca\u0c97\u0cb0\u0cc1<\/strong>, \u0cb6\u0cc0\u0cb0\u0ccd\u0cb7\u0cbf\u0c95\u0cc6 \u0c85\u0c82\u0ca4\u0cc6 \u0c9a\u0cbf\u0ca4\u0ccd\u0cb0 \u0c9f\u0c97\u0cb0\u0cc1 \u0cac\u0cbf\u0ca1\u0cc1\u0c97\u0ca1\u0cc6\u0c97\u0cc2 \u0cae\u0cc1\u0ca8\u0ccd\u0ca8 \u0cad\u0cb0\u0ccd\u0c9c\u0cb0\u0cbf\u0caf\u0cbe\u0c97\u0cbf \u0c95\u0c82\u0ca1\u0cc1 \u0cac\u0c82\u0ca6\u0cbf\u0ca6\u0cc6, \u0c8e\u0cb2\u0ccd\u0cb2\u0cbf \u0c85\u0c82\u0ca4\u0cbf\u0ca6\u0cc0\u0cb0\u0cbe? \u0c88 \u0c9f\u0cc0\u0cb8\u0cb0\u0ccd \u0cb5\u0cbf\u0ca1\u0cbf\u0caf\u0ccb \u0ca8\u0ccb\u0ca1\u0cbf.<\/p>\r\nhttps:\/\/www.youtube.com\/watch?v=scekni9K2Mg\r\n<p style=\"text-align: left;\">\u0c95\u0cb0\u0cc1\u0ca8\u0cbe\u0ca1 \u0c9a\u0c95\u0ccd\u0cb0\u0cb5\u0cb0\u0ccd\u0ca4\u0cbf \u0ca1\u0cbe \u0cb6\u0cbf\u0cb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e\u0c9c\u0ccd \u0cb0\u0cb5\u0cb0 \u0cb9\u0cbf\u0ca8\u0ccd\u0ca8\u0cb2\u0cc6 \u0cb8\u0c82\u0c97\u0cc0\u0ca4.<\/p>\r\n<p style=\"text-align: center;\"><iframe src=\"https:\/\/w.soundcloud.com\/player\/?url=https%3A\/\/api.soundcloud.com\/tracks\/352880786&amp;color=%23ff5500&amp;auto_play=false&amp;hide_related=false&amp;show_comments=true&amp;show_user=true&amp;show_reposts=false&amp;show_teaser=true&amp;visual=true\" width=\"100%\" height=\"300\" frameborder=\"no\" scrolling=\"no\"><\/iframe><\/p>\r\n\u0cae\u0cca\u0ca6\u0cb2 \u0cac\u0cbe\u0cb0\u0cbf\u0c97\u0cc6 \u0ca7\u0ca8\u0c82\u0c9c\u0caf\u0ccd \u0cb5\u0cb8\u0cbf\u0cb7\u0ccd\u0ca0 \u0c92\u0cb3\u0c97\u0cc2\u0ca1\u0cbf \u0c96\u0cb3 \u0ca8\u0c9f \u0c86\u0c97\u0cbf\u0ca6\u0ccd\u0ca6\u0cbe\u0cb0\u0cc6. \u0c9f\u0cc0\u0cb8\u0cb0\u0ccd \u0cb5\u0cbf\u0ca1\u0cbf\u0caf\u0ccb \u0ca8 \u0cb9\u0cbf\u0ca8\u0ccd\u0ca8\u0cb2\u0cc6 \u0cb8\u0c82\u0c97\u0cc0\u0ca4 \u0c95\u0cc2\u0ca1 \u0ca4\u0c82\u0ca1 \u0cac\u0cbf\u0ca1\u0cc1\u0c97\u0ca1\u0cc6 \u0c97\u0cca\u0cb3\u0cbf\u0cb8\u0cbf\u0ca6\u0cc6. \u0c9a\u0cbf\u0ca4\u0ccd\u0cb0 \u0cb6\u0ca4\u0ca6\u0cbf\u0ca8 \u0caa\u0cc2\u0cb0\u0cc8\u0cb8\u0cb2\u0cbf \u0c85\u0ca8\u0ccd\u0ca8\u0ccb\u0ca6\u0cc1 \u0c8e\u0cb2\u0ccd\u0cb2\u0cb0 \u0c86\u0cb6\u0caf.","excerpt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ccd\u0c9f\u0cc7 \u0c9a\u0cbf\u0ca4\u0ccd\u0cb0\u0ca6 \u0c9f\u0cc0\u0cb8\u0cb0\u0ccd \u0cac\u0cbf\u0ca1\u0cc1\u0c97\u0ca1\u0cc6 \u0cae\u0cbe\u0ca1\u0cbf\u0ca6\u0cc6. \u0cb5\u0cbf\u0cb6\u0cc7\u0cb7\u0cb5\u0cc6\u0c82\u0ca6\u0cb0\u0cc6 \u0c87\u0ca6\u0cc6 \u0cae\u0cca\u0ca6\u0cb2 \u0cac\u0cbe\u0cb0\u0cbf\u0c97\u0cc6 \u0c92\u0cac\u0ccd\u0cac \u0ca8\u0cbe\u0caf\u0c95\u0ca8 \u0c85\u0cad\u0cbf\u0cae\u0cbe\u0ca8\u0cbf \u0cac\u0cb3\u0c97 \u0caa\u0cc2\u0cb0\u0ccd\u0ca4\u0cbf \u0c95\u0cbe\u0cb0\u0ccd\u0caf\u0c95\u0ccd\u0cb0\u0cae \u0c85\u0caf\u0ccb\u0c9a\u0cbf\u0cb8\u0cbf\u0ca4\u0ccd\u0ca4\u0cc1. \u0cac\u0cbf\u0ca1\u0cc1\u0c97\u0ca1\u0cc6 \u0c86\u0c97\u0cbf 24\u0c97\u0c82\u0c9f\u0cc6 \u0cae\u0cca\u0ca6\u0cb2\u0cc7 \u0c92\u0c82\u0ca6\u0cc1 \u0cae\u0cc1\u0c95\u0ccd\u0c95\u0cbe\u0cb2\u0cc1 \u0cb2\u0c95\u0ccd\u0cb7\u0c95\u0ccd\u0c95\u0cbf\u0c82\u0ca4 \u0c9c\u0cbe\u0cb8\u0ccd\u0ca4\u0cbf \u0c9c\u0ca8 \u0c88 &hellip;

ich auch String webdata= StringEscapeUtils.unescapeHtml4(jsonHTMLContent); verwendet haben, um Escape-Zeichen in UTF-8 zu konvertieren aber nichts. Bitte helfen Sie mir, dieses Problem zu lösen.

Antwort

0

wie HTML-Inhalt von escaped Character in Webview zu laden.

Hinweis: Bitte entfernen Sie zusätzliche Schrägstriche.

web.loadData("<p style='text-align: left;'><strong>Testing</strong></p><p style='text-align: center;'><iframe src='https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/352880786&amp;color=%23ff5500&amp;auto_play=false&amp;hide_related=false&amp;show_comments=true&amp;show_user=true&amp;show_reposts=false&amp;show_teaser=true&amp;visual=true' width='100%' height='300' frameborder='no' scrolling='no'></iframe></p>\n","text/html", "UTF-8"); 
+0

Ich möchte die Daten dynamisch laden. Nicht der statische HTML-Inhalt. und auch die Daten enthalten einige Kannada-Zeichen. –

+0

ok. Bitte aktualisieren Sie Ihren Webservice. und benutze stripslashes(); Funktion in PHP Webservice –

+0

Was ist das Kodierungsformat von '\ u0cae \ u0cc8 \ u0caf \ u0cc6 \ u0cb2 \ u0ccd \ u0cb2 \ u0cbe' –

Verwandte Themen