title: Issues with newline character while using ansi-term in emacs
body: <p>I am trying to use ansi-term in emacs (configured to tcsh shell). I see some issues with newline characters being displayed. If I try the following from the terminal (ansi-term), I get the correct output: </p>
  
  <pre><code>myterm &gt; echo "Line1"; echo "Line2"; echo "Line3";    
  Line1
  Line2
  Line3
  myterm &gt;
  </code></pre>
  
  <p>But if I try putting the same lines in a shell script and try to execute the script from ansi-term, I get a wrong output</p>
  
  <p>Script: (test)</p>
  
  <pre><code>#!/usr/bin/env tcsh
  echo "Line1"; echo "Line2"; echo "Line3";
  </code></pre>
  
  <p>Running the script (test):</p>
  
  <pre><code>myterm &gt; ./test
  Line1
       Line2
            Line3
                 myterm &gt;
  </code></pre>
  
  <p>Note: /usr/bin/env tcsh does point to the correct shell (its the same shell that I used while invoking ansi-term). Also executing the script from gnome-terminal also displays the correct output.
  I have also tried setting the following variables but it did not solve my issues:</p>
  
  <pre><code>(set-terminal-coding-system 'utf-8-unix)
  (setq default-process-coding-system '((utf-8-unix . utf-8-unix)))
  </code></pre>