L
Lorenzo Puglioli
Hi all,
in my windows application I have to read a text file to a string array. The
file contains a û character (code 251).
On my pc all works fine, but in the production one the û characters
disapperas, the string resulting 1 character shorter.
The code that do the reading is shown here:
Using sr As System.IO.StreamReader = New
System.IO.StreamReader(Me.File.OpenRead, System.Text.Encoding.UTF8)
Dim s As List(Of String)
s = New List(Of String)
Do While Not sr.EndOfStream
s.Add(sr.ReadLine)
Loop
Return s.ToArray
End If
End Using
Why, even if I force the UTF8 decoding, the behavior on different PCs is not
the same?
My app runs on framework 2.0, operating system is windows xp pro in italian
language (in both PCs).
On my pc were installed the italian language pack: I also installed it on
the production one, but never changed.
Someone could help me?
Thank you in advance.
Lorenzo Puglioli
in my windows application I have to read a text file to a string array. The
file contains a û character (code 251).
On my pc all works fine, but in the production one the û characters
disapperas, the string resulting 1 character shorter.
The code that do the reading is shown here:
Using sr As System.IO.StreamReader = New
System.IO.StreamReader(Me.File.OpenRead, System.Text.Encoding.UTF8)
Dim s As List(Of String)
s = New List(Of String)
Do While Not sr.EndOfStream
s.Add(sr.ReadLine)
Loop
Return s.ToArray
End If
End Using
Why, even if I force the UTF8 decoding, the behavior on different PCs is not
the same?
My app runs on framework 2.0, operating system is windows xp pro in italian
language (in both PCs).
On my pc were installed the italian language pack: I also installed it on
the production one, but never changed.
Someone could help me?
Thank you in advance.
Lorenzo Puglioli