The "scrambling" has already happened in this case
(meaning that the passed param uXML already contains "mangled" string-data).
Please check, where (and how) this uXML-param was retrieved (and then passed) -
and whether the proper decoding took place whilst filling it elsewhere.
It might also be, that the xml-header-string (as shown below, for UTF8-mode) -
points to a code-page, entirely different from UTF8... XML allows that...
(in which case, you shouldn't write it out as UTF8 via New_c.FSO.WriteTextContent).
The example code below shows, that when uXML is filled with proper Unicode,
the WebView2 can show Unicode-XML (in this case with a few german Umlauts), just fine.
HTHCode:Private WithEvents WV As cWebView2 Private Sub Form_Load() Visible = True Set WV = New_c.WebView2(hWnd) Dim uXml$: uXml = "<?xml version='1.0' encoding='UTF-8'?>" & vbCrLf & _ "<root><foo>" & ChrW(228) & ChrW(246) & ChrW(252) & _ "</foo><bar>" & ChrW(223) & ChrW(8364) & ChrW(248) & "</bar></root>" Const FileName = "c:\temp\simple.xml" New_c.FSO.WriteTextContent FileName, uXml, True WV.Navigate FileName End Sub
Olaf




Reply With Quote