Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8744243
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T11:48:46+00:00 2026-06-13T11:48:46+00:00

page = <!DOCTYPE HTML><html><head><meta http-equiv=’Content-Type’ content=’text/html; charset=utf-8′> + </head><body> + page + </body></html>; webContent.loadData(page,

  • 0
page = "<!DOCTYPE HTML><html><head><meta http-equiv='Content-Type' content='text/html; charset=utf-8'>" +
                    "</head><body>" + page + "</body></html>";
            webContent.loadData(page, "text/html;charset=UTF-8", "UTF-8");

On the call to loadData the webview gives “URL is invalid”, in the onReceivedError callback
the url is “data:text/html;charset=UTF-8;UTF-8,%3C!DOCTYPE%20HTML%3E …. /body%3E%3C/html%3E”. This doesn’t happen on all the data I load.

Note:

  • in jelly bean everything works fine, this problem occurs while testing on 2.3
  • I’ve tried loading data with loadDataWithBaseURL but the webview does’t interpret the html, just shows the string content.

Thank you!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T11:48:47+00:00Added an answer on June 13, 2026 at 11:48 am
    webContent.loadDataWithBaseURL(null, page, "text/html", "UTF-8")
    

    works for me, while with loadData() I get sometimes your problem

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

<!DOCTYPE html> <html> <head> <title>Title</title> <meta http-equiv=content-type content=text/html; charset=utf-8> <style type=text/css> body { background:
index.php <!DOCTYPE html> <html> <head> <meta http-equiv=Content-Type content=text/html; charset=utf-8 /> <title>Form submit in php
Div height is not support in below code <html> <head> <meta http-equiv=Content-Type content=text/html; charset=windows-1252>
<!DOCTYPE html> <html> <head> <meta name=viewport content=initial-scale=1.0, user-scalable=no /> <meta http-equiv=content-type content=text/html; charset=UTF-8 />
I have below code in jsp myDisplayImage.jsp <!DOCTYPE html> <html> <head> <meta http-equiv=Content-Type content=text/html;
can use anything in any order? does placing of <meta http-equiv=Content-Type content=text/html;charset=UTF-8> is important
This is my exibitview.html page <!DOCTYPE html> <html lang=en manifest=health.cache> <head> <meta http-equiv=cache-control content=no-cache
Here is the code I have written so far <!DOCTYPE html> <head> <meta http-equiv=Content-Type
<!DOCTYPE html> <html> <head> <meta charset=utf-8 /> <title>Remote Control</title> </head> <link rel=stylesheet href=/../.. type=text/css
Edit: Entire page (HTML) <!doctype html> <html> <head> <meta charset=utf-8 /> <title>jQuery Ajax Test</title>

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.