The abc.txt File Contents are
ABCDEFGHIJ•XYZ
Now, The Character Shown is Fine if I use this code (i.e. Seek to position 9),
string filePath = "D:\\abc.txt";
FileStream fs = new FileStream(filePath, FileMode.Open);
StreamReader sr = new StreamReader(fs, new UTF8Encoding(true), true);
sr.BaseStream.Seek(9, SeekOrigin.Begin);
char[] oneChar = new char[1];
char ch = (char)sr.Read(oneChar, 0, 1);
MessageBox.Show(oneChar[0].ToString());
But if the SEEK position is Just after that Special Dot Character, then I Get Junk Character.
So, I get Junk Character if I do Seek to position 11 (i.e. just after the dot position)
sr.BaseStream.Seek(11, SeekOrigin.Begin);
This should give 'X', because the character at 11th position is X.
I think the File contents are legally UTF8.
There is also one more thing, The StreamReader BaseStream length and the StreamReader Contents Length is different.
MessageBox.Show(sr.BaseStream.Length.ToString());
MessageBox.Show(sr.ReadToEnd().Length.ToString());