The browser / webview should indicate what encoding the document is in, otherwise it will guess some encoding or use the default one, which may be incorrect. Usually you pass an encoding using an HTTP header. If you open the file from local storage, it is obvious that HTTP is not involved. Therefore, you need to specify the encoding in the document header itself, using
<meta http-equiv="Content-Type" content="text/html; charset=ENCODING HERE">
or, for HTML 5 documents:
<meta charset="ENCODING HERE">
Make sure the ad matches the way the document is actually encoded.
source share