iOS Question UTF8 Encoding Of HTML Assets

RichardN

Well-Known Member
Licensed User
Longtime User
I am using this code to read some .htm files into an iWebView:

B4X:
Private html As String = File.ReadString(File.DirAssets, HTMLfilename)
WebView1.LoadHtml(html)

The File.Readstring() function appears to throw an exception at any input file that is not encoded in UTF8. (Unable to read file. Incorrect coding).

I can of course load all my ANSI HTML files into MS Notepad and then save them as UTF8 but that is a complete PITA. Is there a simpler method that will read the ANSI files without the conversion ?
 
Top