title: Read Arabic characters from webpage
body: <p>I am trying to extract PDF links from this <a href="https://www.moj.gov.sa/ar/Ministry/Departments/ResearchCenter/Pages/%D9%86%D8%B4%D8%B1%20%D8%A7%D9%84%D8%A3%D8%AD%D9%83%D8%A7%D9%85.aspx" rel="nofollow noreferrer">LINK</a> 
  There are three topics on this page and each is displayed by the collapse method and below each topic, there are sub-topics (months in Hijri calendar).
  Below each sub-topic, there are PDF links.
  How can I extract those links in organized columns: Column A would be for topics and Column B for sub-topics and Column C for the PDF links?</p>
  
  <p>When trying this code</p>
  
  <pre><code>Sub Demo()
  Dim intFF As Integer: intFF = FreeFile()
  Dim iFile As String: iFile = "C:\Test\HTML.txt"
  Dim html As HTMLDocument
  Open iFile For Input As #intFF
  strContent = Input(LOF(intFF), intFF)
  Close #intFF
  
  Set html = New HTMLDocument
  
  With html
  .body.innerHTML = strContent
  Set x = .getElementsByTagName("a")
  For i = 0 To x.Length - 1
      If x(i).getAttribute("data-parent") Like "*accordion1" Then
          Debug.Print x(i).innerText
      End If
      If x(i).getAttribute("data-parent") Like "*accordion2" Then
          Debug.Print x(i).innerText
      End If
  Next
  End With
  End Sub
  </code></pre>
  
  <p>First problem the Arabic characters arenot displayed well. And another point this brings only the first main topic and there are two other main topics.</p>
  
  <p>And here's the HTML in case the link doesn't work for you
  <a href="https://drive.google.com/open?id=1lJ7U1z3vOWz4pfbhdKi31_q674rcnuxR" rel="nofollow noreferrer">https://drive.google.com/open?id=1lJ7U1z3vOWz4pfbhdKi31_q674rcnuxR</a></p>