title: How to pass multilined TStrings data from a TIdTCPServer to TIdTCPClient
body: <p>I tried to pass a database record from my server-side application to my client-side application. On the client-side I need to store my data into a <code>TStrings</code> collection.</p>
  
  <p>When I pass a multiline field, I receive two separate data items at the client-side, instead of one multiline data item! I've also tried to do that with Unicode UTF8 based commands, but unfortunately the result is same.</p>
  
  <p>Server-side code:</p>
  
  <pre><code>procedure TForm1.IdCmdTCPServer1CommandHandlers0Command(ASender: TIdCommand);
  var
    myData: TStrings;
  begin
    myData := TStringList.Create;
  
    myData.Add('12'); // ID
    myData.Add('This is a multi line' + #13#10 + 'description.'); // Descriptions
    myData.Add('Thom Smith'); // Name
  
    try
      ASender.Context.Connection.Socket.Write(myData, True{, TIdTextEncoding.UTF8});
    finally
      myData.Free;
    end;
  end;
  </code></pre>
  
  <p><code>myData</code> debug-time values on server-side are:</p>
  
  <pre><code>myData[0] = '12'
  myData[1] = 'This is a multi line'#$D#$A'description.'
  myData[2] = 'Thom Smith'
  </code></pre>
  
  <p>Client-side code:</p>
  
  <pre><code>procedure TForm1.Button1Click(Sender: TObject);
  var
    myData: TStrings;
  begin
    with TIdTCPClient.Create(nil) do
    begin
      Port := 1717;
      Host := 'localhost';
  
      try
        Connect;
        //IOHandler.DefStringEncoding := TIdTextEncoding.UTF8;
  
        myData := TStringList.Create;
        try
          SendCmd('greating');
          Socket.ReadStrings(myData, -1{, TIdTextEncoding.UTF8});
  
          eID.Text    := myData[0];  // ID TEdit
          mDes.Text   := myData[1];  // Descriptions TMemo
          eTelNo.Text := myData[2];  // Name TEdit
        finally
          myData.Free;
        end;
      finally
        Disconnect;
        Free;
      end;
    end;
  end;
  </code></pre>
  
  <p><code>myData</code> debug-time valuese on client-side:</p>
  
  <p>myData[0] = '12'
     myData<a href="https://i.stack.imgur.com/j3JyT.png" rel="nofollow noreferrer">1</a> = 'This is a multi line'
     myData[2] = 'description.'</p>
  
  <p>Telnet result:</p>
  
  <p><img src="https://i.stack.imgur.com/j3JyT.png" alt="enter image description here"></p>
  
  <p>Actually, <code>myData[2]</code> that should keep <code>'Thom Smith'</code> was replaced with the second line of the Description field! and there are no items after <code>myData[2]</code>. <code>myData[3]</code> is not accessible any more.</p>
  
  <p>I think this issue is related to Indy's <code>Write</code> or <code>ReadStrings</code> procedures, because it sends ItemCount as 3, but it sends two items (one correct, and next beaked to two items!). </p>
  
  <p>How can I pass a Carriage Return character to the other side without having the <code>Write</code> procedure break <code>myData[1]</code> into two separate lines?</p>
  
  <p>Thanks a lot.</p>