title: Delphi INI readstring limitation
body: <p>I'm storing my application's settings in an INI file. I read that there is a limitation of 2kb for a binary entry so I encoded the binary into a string and stored the value as string (writestring). When checking the file, it seems that all the string was stored as expected.</p>
  
  <p>When trying to read it back, it seems that only 2047 characters were read so when decoding it back to a stream, it fails.</p>
  
  <p>Apparently it seems there is a 2kb limitation for string as well but I was wondering if that is that or maybe I did something wrong. If there's such a limitation, any idea how can I bypass it?</p>
  
  <p>Thanks</p>
  
  <p>EDIT:
  silly me, I went to system.inifiles and it says in the code</p>
  
  <pre><code>function TIniFile.ReadString(const Section, Ident, Default: string): string;
  var
    Buffer: array[0..2047] of Char; &lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;
  begin
  
    SetString(Result, Buffer, GetPrivateProfileString(MarshaledString(Section),
      MarshaledString(Ident), MarshaledString(Default), Buffer, Length(Buffer),
      MarshaledString(FFileName)));
  end;
  </code></pre>