title: Sending special strings with "WriteLn" in "Indy" (Delphi)
body: <p>In Indy when we are sending some strings to the server , they change and will be shown in new format . for example i tried to send a binary file(File.exe) with "WriteLn" command in indy :</p>
  
  <pre><code>    Ms.LoadFromFile(FileAddress);
  
      Ms.Read(B, Chunk);
  
      for j := low(B) to high(B) do
      begin
        Part := Part + chr(B[j]);
      end;
  </code></pre>
  
  <p>and for sending strings :</p>
  
  <pre><code>FileClient.IOHandler.WriteLn(Part);
  </code></pre>
  
  <p>when client was sending strings to the server , i was monitoring the clinet with a sniffer . and finally i got this results :</p>
  
  <pre><code>MZ?.........yy..,.......@...................................,.....o..?.I!,.LI!This    program cannot be run in DOS mode....$..
  </code></pre>
  
  <p>As you see there are some characters that they are not in their true format any more and they changed to "?" character . but it should be noted that the sniffer automatically changed some string to "." , for example one of this points(".") is chr(0) or chr(5) maybe !!</p>
  
  <p>but the sniffer couldn't change some characters to "." and we see them in "?" format .
  for example i open a binary file with notepad and you can see true format :</p>
  
  <p><a href="http://up.iranblog.com/Files/9f195012dbc2425b8773.png" rel="nofollow noreferrer">alt text http://up.iranblog.com/Files/9f195012dbc2425b8773.png</a>
  Anyway , the question is : how can i send a binary file with "WriteLn" command in Indy 10 ?</p>