Function File2StringUTF8(fil) Dim ts, ado Dim strText Set ado = Nothing On Error Resume Next Set ado = CreateObject("ADODB.Stream") On Error Goto 0 If ado Is Nothing Then 'Read ASCII Set ts = fil.OpenAsTextStream(1) strText = ts.ReadAll ts.Close Else 'Read UTF-8 text Set ado = CreateObject("ADODB.Stream") ado.CharSet = "utf-8" ado.Open ado.LoadFromFile(fil.Path) strText = ado.ReadText() ado.Close Set ado = Nothing End If File2StringUTF8 = strText End Function