<h1 dir="auto">Environment</h1>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Windows build number:18362
Windows Terminal version (if applicable):

Any other software?"><pre lang="none" class="notranslate"><code class="notranslate">Windows build number:18362
Windows Terminal version (if applicable):

Any other software?
</code></pre></div>
<h1 dir="auto">Steps to reproduce</h1>
<p dir="auto">I am attaching a simple program that write "\033[" and "0c" to stdout. When I use the EchoCon sample to launch this under ConPTY, I only see "0c" in the output.  Breaking at the WriteFile at the bottom of the EchoCon sample, I see the following things:</p>
<ol dir="auto">
<li>An initial XTERM SetTitle OSC, which is unexpected but manageable.</li>
<li>A sequence of "[escape code for cursor off]" "0c" "[escape code cursor on]"  (notice \033[ is missing)</li>
</ol>

<p dir="auto">code attached:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="#include &lt;Windows.h&gt;
#include &lt;stdio.h&gt;

int main(int argc, char**argv) {

  char *csi = &quot;\033[&quot;;
  char *da = &quot;0c&quot;;
  DWORD bwrote =0;

	/*
    HANDLE hConsole = { GetStdHandle(STD_OUTPUT_HANDLE) };

 DWORD consoleMode = 0;
  GetConsoleMode(hConsole, &amp;consoleMode);
   SetConsoleMode(hConsole, consoleMode | ENABLE_VIRTUAL_TERMINAL_PROCESSING);
   */
  WriteFile(GetStdHandle(STD_OUTPUT_HANDLE),csi,2,&amp;bwrote,NULL);
  WriteFile(GetStdHandle(STD_OUTPUT_HANDLE),da,2,&amp;bwrote,NULL);

}"><pre class="notranslate"><code class="notranslate">#include &lt;Windows.h&gt;
#include &lt;stdio.h&gt;

int main(int argc, char**argv) {

  char *csi = "\033[";
  char *da = "0c";
  DWORD bwrote =0;

	/*
    HANDLE hConsole = { GetStdHandle(STD_OUTPUT_HANDLE) };

 DWORD consoleMode = 0;
  GetConsoleMode(hConsole, &amp;consoleMode);
   SetConsoleMode(hConsole, consoleMode | ENABLE_VIRTUAL_TERMINAL_PROCESSING);
   */
  WriteFile(GetStdHandle(STD_OUTPUT_HANDLE),csi,2,&amp;bwrote,NULL);
  WriteFile(GetStdHandle(STD_OUTPUT_HANDLE),da,2,&amp;bwrote,NULL);

}
</code></pre></div>
<p dir="auto">If I uncomment the call to SetConsoleMode in the child process, it shows a bizzarre sequence of "\r\n" after the Xterm sequence.</p>
<h1 dir="auto">Expected behavior</h1>
<p dir="auto">Just my \033[0c</p>

<h1 dir="auto">Actual behavior</h1>
<p dir="auto">As described above. I am probably just overlooking something, but I'd love to find an explanation for this.</p>
<h1 dir="auto">Environment</h1>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Windows build number: Version 10.0.18362.356
Windows Terminal version (if applicable): 0.4.2382.0

Any other software?: as usual: *mine*. :-)"><pre lang="none" class="notranslate"><code class="notranslate">Windows build number: Version 10.0.18362.356
Windows Terminal version (if applicable): 0.4.2382.0

Any other software?: as usual: *mine*. :-)
</code></pre></div>
<h1 dir="auto">Steps to reproduce</h1>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="echo -ne &quot;a\tb&quot;"><pre class="notranslate"><span class="pl-c1">echo</span> -ne <span class="pl-s"><span class="pl-pds">"</span>a\tb<span class="pl-pds">"</span></span></pre></div>
<h1 dir="auto">Expected behavior</h1>
<p dir="auto">The terminal emulator should receive "a\tb\n" (or "\a\tb\r\n" respectively).</p>
<h1 dir="auto">Actual behavior</h1>
<p dir="auto">Receives <code class="notranslate">"a\x20\x20\x20\x20\x20\x20\x20b\n"</code> (I'm using <code class="notranslate">\x20</code> here, because GitHub didn't like my actual SPs :) )</p>