Home » Android » html – Webview doesnt show Æ Ø Å properly

html – Webview doesnt show Æ Ø Å properly

Posted by: admin June 15, 2020 Leave a comment

Questions:

I have some content on a webpage which contains æ ø å, but my webview cant show them properly.

Does anyone know what the problem might be ?

How to&Answers:

In order to use UTF-8 characters inside an (X)HTML page you declare the encoding with this meta tag (in the head section of the page):

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

If that alone does not work you may be able to find more useful information here.

Answer:

You need to ensure that the HTML file is saved as UTF-8 and that the Content-Type header in the HTTP response contains the proper charset. You can verify the headers by among others Firebug.

A <meta> tag for Content-Type would only work when the Content-Type header in the response is absent and this is usually not the case when the HTML file is served over HTTP. However, its presence is good for offline viewing and self-documentary purposes.