J
jmr
Hi All,
I'm trying to read an UTF8 encoded file and write it with Encoding.Default.
The problem is that the accented characters in the output file are not
good when I open the file using an editor. I have question marks e.g
Bezenc?on.
Here is the code I use:
Dim sr As System.IO.StreamReader = New System.IO.StreamReader(fname,
Encoding.UTF8)
Dim S As String = sr.ReadToEnd
response.writel(S) 'NOTE THAT THE ACCENTED CHARS ARE OK HERE
sr.close()
Dim w As System.IO.StreamWriter = New System.IO.StreamWriter(fout,
false, Encoding.Default)
w.write(S)
w.Close()
Any idea ?
Thanks,
Jean-Michel
I'm trying to read an UTF8 encoded file and write it with Encoding.Default.
The problem is that the accented characters in the output file are not
good when I open the file using an editor. I have question marks e.g
Bezenc?on.
Here is the code I use:
Dim sr As System.IO.StreamReader = New System.IO.StreamReader(fname,
Encoding.UTF8)
Dim S As String = sr.ReadToEnd
response.writel(S) 'NOTE THAT THE ACCENTED CHARS ARE OK HERE
sr.close()
Dim w As System.IO.StreamWriter = New System.IO.StreamWriter(fout,
false, Encoding.Default)
w.write(S)
w.Close()
Any idea ?
Thanks,
Jean-Michel