Hi All
I made function

TextBox1.Text = String.Empty
        Using fs As New FileStream(Path, FileMode.Open)
            fs.Position = 0
            Using br As New BinaryReader(fs)
                For x As Int16 = 0 To 150
                    TextBox1.Text = Asc(br.ReadChar) & " "
            End Using

        End Using

but when I ReadByte for small file (2 KB) it works but when i use it for more than 2 KB msb Shown
The output char buffer is too small to contain the decoded characters, encoding 'Unicode (UTF-8)' fallback 'System.Text.DecoderReplacementFallback'. Parameter name: chars"}
what can I do ????

Member Avatar

not sure what you want
but i suggest you first loads all the bytes into an array and then
use system.text.encoding.ascii.getstring(bytearray)
to convert everything