Hello, I'm a bit stuck trying to figure out how to import data from a text doc without losing accents marks (currently they are all being converted into question mark icons). The text file being retrieved is fine so I figure I need to add encoding support(?), just have had no luck figuring out how to implement it. Thanks for all help in advance =)
VB.NET:
Dim FileText As String
Dim FileLines() As String
Dim Separators(1) As String
Dim SeparatorChar As String
Separators(0) = Environment.NewLine
Separators(1) = ControlChars.Tab
Dim i As Integer
' Check that file exists
If My.Computer.FileSystem.FileExists(Route) Then
' Read the whole file to a string
FileText = My.Computer.FileSystem.ReadAllText(Route)
' Split to lines
FileLines = FileText.Split(CChar(Environment.NewLine))
' Now FileLines array has all the lines from the file
SeparatorChar = " "
' Loop the lines
For i = 0 To FileLines.GetUpperBound(0)
OneLine = FileLines(i).Split(Separators(1))
Word.L1(i) = OneLine(0)
Next i