Index: twisted/test/test_ftp.py
===================================================================
--- twisted/test/test_ftp.py	(revision 36436)
+++ twisted/test/test_ftp.py	(working copy)
@@ -962,7 +962,62 @@
         return d
 
 
+class DTPTests(unittest.TestCase):
+    """
+    Tests for L{ftp.DTP}.
 
+    The DTP instances in these tests are generated using
+    DTPFactory.buildProtocol()
+    """
+
+    def setUp(self):
+        """
+        Create a fake protocol interpreter, a L{ftp.DTPFactory} instance,
+        and dummy transport to help with tests.
+        """
+        self.reactor = task.Clock()
+
+        class ProtocolInterpreter(object):
+            dtpInstance = None
+
+        self.protocolInterpreter = ProtocolInterpreter()
+        self.factory = ftp.DTPFactory(
+            self.protocolInterpreter, None, self.reactor)
+        self.transport = proto_helpers.StringTransportWithDisconnection()
+
+
+    def test_sendLine_newline(self):
+        """
+        Whend sending a line, the newline delimiter will be autoamtically
+        added.
+        """
+        dtp_instance = self.factory.buildProtocol(None)
+        dtp_instance.makeConnection(self.transport)
+        line_content = 'line content'
+
+        dtp_instance.sendLine(line_content)
+
+        data_sent = self.transport.value()
+        self.assertEqual(line_content + '\r\n', data_sent)
+
+
+    def test_sendLine_unicode(self):
+        """
+        When sending an unicode line, it will be converted to str.
+        """
+        dtp_instance = self.factory.buildProtocol(None)
+        dtp_instance.makeConnection(self.transport)
+        line_content = u'my resum\xe9'
+
+        dtp_instance.sendLine(line_content)
+
+        data_sent = self.transport.value()
+        self.assertTrue(isinstance(data_sent, str))
+        # Please advise what test to use.
+        # self.assertEqual('my resum\xc3\xa9' + '\r\n', data_sent)
+        self.assertEqual(line_content.encode('utf-8') + '\r\n', data_sent)
+
+
 # -- Client Tests -----------------------------------------------------------
 
 class PrintLines(protocol.Protocol):
Index: twisted/protocols/ftp.py
===================================================================
--- twisted/protocols/ftp.py	(revision 36436)
+++ twisted/protocols/ftp.py	(working copy)
@@ -386,9 +386,18 @@
             self._onConnLost.callback(None)
 
     def sendLine(self, line):
+        """
+        Send a line to data channel.
+
+        @type  line: I{str} or I{unicdoe}
+        @param line: The line to be sent.
+
+        If line is I{unicode}, it will be converted to I{str}.
+        """
+        if isinstance(line, unicode):
+            line = line.encode('utf-8')
         self.transport.write(line + '\r\n')
 
-
     def _formatOneListResponse(self, name, size, directory, permissions, hardlinks, modified, owner, group):
         def formatMode(mode):
             return ''.join([mode & (256 >> n) and 'rwx'[n % 3] or '-' for n in range(9)])
