title: how to get the real file contents using TFilestream?
body: <p>i try to get the file contents using TFilestream:</p>
  
  <pre><code>procedure ShowFileCont(myfile : string);
  var
  tr : string;
  fs : TFileStream;
  Begin
     Fs   := TFileStream.Create(myfile, fmOpenRead or fmShareDenyNone); 
     SetLength(tr, Fs.Size);
     Fs.Read(tr[1], Fs.Size);
     Showmessage(tr); 
     Fs.Free;
  end;
  </code></pre>
  
  <p>I do a little text file with contents only:
  aaaaaaaJ“њРЉTщЂ®8ЈЏVд"Ј¦AИaaaaaaa</p>
  
  <ol>
  <li>And save this file (using AkelPad) with 1251 (ansi) codepege</li>
  <li>Save with 65001 (UTF8) codepage.</li>
  </ol>
  
  <p>these to files has different size but there contents is equal - i oped them both in notepad and they both has the same contents</p>
  
  <p>But when i run ShowFileCont proc it shows to me different results:</p>
  
  <ol>
  <li>aaaaaaaJ?ЊT?8?V?"?A?aaaaaaa</li>
  <li>aaaaaaaJ“њРЉTщЂ®8ЈЏVд"Ј¦AИaaaaaaa</li>
  </ol>
  
  <p>Questions:</p>
  
  <ol>
  <li>how to get the real file contents using TFilestream?</li>
  <li>How to explain that these 2 files has different size but the content (in notepad) is equeal? </li>
  </ol>
  
  <p>Add: Sorry, i didn't say that i use Lazarus FPC and string = utf8string</p>