title: PL/SQL FTP API binary vs ascii mode
body: <p>I've compiled successfully the <a href="http://www.oracle-base.com/articles/misc/ftp-from-plsql.php" rel="nofollow">package and package body from Oracle-base given by Tim Hall</a>,</p>
  
  <p>I've a .txt file in my local server which is to transfer in a remoter server:
  It successfully runs and got the file in remote server in the same data,
  when I run in binary mode follows:</p>
  
  <pre><code>set serveroutput on
  DECLARE
    l_conn  UTL_TCP.connection;
  BEGIN
    L_CONN := FTP.LOGIN('192.168.x.y', '21', 'username','pass');
    ftp.binary(p_conn =&gt; l_conn);
   ftp.put(p_conn      =&gt; l_conn,
            P_FROM_DIR  =&gt; 'MY_DIRECTORY',
            p_from_file =&gt; 'test.txt',
            p_to_file   =&gt; 'test_put.txt');
    ftp.logout(l_conn);
  END;
  /
  anonymous block completed
  220 (vsFTPd 2.0.5)
  331 Please specify the password.
  230 Login successful.
  200 Switching to Binary mode.
  227 Entering Passive Mode (192,168,1,232,35,205)
  150 Ok to send data.
  226 File receive OK.
  221 Goodbye.
  </code></pre>
  
  <p>But when I run in <code>ftp.ascii</code> mode, 
  It also run successfully too:</p>
  
  <pre><code>200 Switching to ASCII mode.
  </code></pre>
  
  <p>But the final output in the remote server looks like </p>
  
  <pre><code>ã€±â¼±ã„¯ãˆ°ã„³â€±ãˆºã€°ã¨°ã€ æ…­â°°â°°â°°â°°â°´ã¤°ãˆµã€¶ãœ¬ã€¬ä¸¬ä…´ç‘©æ¹§æ…¬â—ä ­å˜±ã€­å˜²ã„¬ä¸¬å”¬å”¬â°¬â°¬â°¬â°¬ãœ¶â¸·ã¤·ãœ¹ãŒ³ãŒ³ãŒ³ãŒ³ãŒ¬ã ®ãœ±ã¤µã€±ã˜¶ã˜¶ã˜¶ã˜¶ã˜Šã€±â¼±ã„¯ãˆ°ã„³â€±ãˆºã€°ã¨°ã˜ æ…­â°°â°°â°°â°°â°´ã¤°ãˆµã€¶ãœ¬ã€¬ä¸¬ä…´ç‘©æ¹§æ…¬â—ä ­å˜±ã€­å˜²ã„¬ä¸¬å”¬å”¬â°¬â°¬â°¬â°¬ãœ¶â¸·ã¤·ãœ¹ãŒ³ãŒ³ãŒ³ãŒ³ãŒ¬ã ®ãœ±ã¤µã€±ã˜¶ã˜¶ã˜¶ã˜¶ã˜Šã€±â¼±ã„¯ãˆ°ã„³â€±ãˆºã€°ã¨±ãˆ æ…­â°°â°°â°°â°°â°´ã¤°ãˆµã€¶ãœ¬ã€¬ä¸¬ä…´ç‘©æ¹§æ…¬â—ä ­å˜±ã€­å˜²ã„¬ä¸¬å”¬å”¬â°¬â°¬â
  </code></pre>
  
  <p>I've tested the same in <code>cmd</code> using ftp ascii mode, and runs very well;</p>
  
  <p>How can I transfer in ascii mode to get actual data in the remote server in pl/sql above?
  Thanks in advance:)</p>