0

I have data that I want displayed in a listview.
Problem is when I read from a file with System.Text.Encoding.GetEncoding("Windows-1252"),
it shows up in listview with Zoë instead of Zoë as it should.
How can I make my listview code to show the correct diacritics in the view?

This is the part of the code where it is inserted:

        objStreamReader = New StreamReader(strStorageFile, System.Text.Encoding.GetEncoding("Windows-1252"))
        If strParam2 = "" Then
            Do While objStreamReader.Peek() > 0
                strKarLine = objStreamReader.ReadLine()
                strKars = strKarLine.Split(";")
                If strKars(intCate1) = strParam1 Then
                    insert = New ListViewItem(strKars)
                    ListView1.Items.Add(insert)
                End If
            Loop
        Else
            Do While objStreamReader.Peek() > 0
                strKarLine = objStreamReader.ReadLine()
                strKars = strKarLine.Split(";")
                If (strKars(intCate1) = strParam1 AndAlso strKars(intCate2) = strParam2) Then
                    insert = New ListViewItem(strKars)
                    ListView1.Items.Add(insert)
                End If
            Loop
        End If
2
Contributors
1
Reply
6
Views
1 Year
Discussion Span
Last Post by gusano79
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.