I am trying to read a text file line-wise into a string array (each line of the text file going into one member of the array).

The name and/or path of the text file may be ANSI or may be unicode.
The CONTENTS of the text file also may be ANSI or may be unicode. In other words trying to line-wise read the contents of either an ANSI text file or a unicode text file.

Nothing that I do works.

For example this code:
Code:
   Dim New_c          As New cConstructor
   Dim FileContent    As String
   dim LineList()     As string

   With New_c.fso.OpenFileStream(File_Name)
      .ReadToByteArr bytResults()
   End With
   
   'Convert to string
   If (bytResults(0) = &HFF) And (bytResults(1) = &HFE) Then
      FileContent = Mid$(bytResults, 2)
   Else
      FileContent = bytResults()                          
   End If

   LineList() = Split(FileContent, vbCrLf)
When I read the contents of the text file using the above code, and display it into an InkEdit textbox, it shows completely wrong stuff (strange characters) that look nothing like the real contents of the text file.

Also, when I step through the above code, I realize that for a unicode text file (a text file with its CONTENTS being unicode):
Unlike what I expect, the first byte of the file is NOT &HFF
And the second byte is NOT &HFE
So, the Else part of that If statement kicks in.

I really don't understand what's going on.

How can I write a simple piece of code (using whatever technique) that would read line-wise the contents of any text file (ANSI or unicode file name and or ANSI or unicode content).

There should be a way of doing this, but I don't know why nothing works.

Please help.
Thanks.