[VB2005]write a file
I need to write a string composed by some characters using the function CHR(int). Give a look to the code:
Using sw As StreamWriter = New StreamWriter(c:\file.dat", True, Enc.ASCII)
Mystr = "0000148" & Chr(255) & Chr(255) & Chr(235) & Chr(127) & "Sample"
sw.Write(Mystr)
sw.Close()
End Using
What the program writes into the file is:
{0000148?
in hex
7B 30 30 30 30 31 34 383f 3f 3f7f
instead it must be..........38ff ff ff7f
I think the why is due to a different charachters encoding.
Could you help me?

