Hi,
I added the code below i'm using. I'm using an array instead of an
arraylist. It's not something i'm proud off, but it works...
Where do I have to add the encoding ?
John
Private arrContentFile() As String
Dim oFile As System.IO.File
Dim oRead As System.IO.StreamReader
Private Sub ReadfileTest(ByVal strFilename As String)
Dim intCount As Int64 = 0
Dim strLine As String
Dim objStreamReader = New System.IO.StreamReader(strFilename)
strLine = objStreamReader.ReadLine
Do While Not strLine Is Nothing
If Not (IsNothing(arrContentFile)) Then
intCount = arrContentFile.GetUpperBound(0) + 1
End If
ReDim Preserve arrContentFile(intCount)
arrContentFile(intCount) = strLine
strLine = objStreamReader.ReadLine
Loop
objStreamReader.Close()
End Sub
"Armin Zingler" <az*******@freenet.dewrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
"John Devlon" <jo********@hotmail.comschrieb
>Hi,
Can anyone please help me?
I've wrote a small application that reads the content from a
text-file. Some characters are not displayed correcly.
I noticed the text-file uses different types of Accent Signs (').
Is there some simple methode to replace all of them to just one kind
?
thanx
You must use the correct encoding when reading from the file. When
creating a StreamReader pass the correct System.Text.Encoding instance to
it's constructor.
Armin