title: Delphi - TStringList Save/Load to stream encoding
body: <p>I'm working with <code>TStringList</code> with <code>TMemeorySteam</code> a lot in my project.</p>
  
  <pre><code>  msTmp := TMemoryStream.Create;
    try
       lTemp.SaveToStream(msTmp, TEncoding.Unicode);
    finally
      msTmp.Free;
    end;
    .....
    lTemp := TStringList.Create;
    try
       lTemp.LoadFromFile(msTmp, TEncoding.Unicode);
    finally
      lTemp.Free;
    end;
  </code></pre>
  
  <p>How i can tell the <code>LoadFromStream()</code> and <code>SaveToStream()</code>   that the stream is UTF-16 encoded by default in my project without including the encoded type in each call.
  so i can call <code>LoadFromStream(msTmp)</code> only and it will load with UTF-16 encoded.</p>