title: Why is there a difference between the encoding of the Windows Command Prompt vs. a batch file?
body: <p>For example, suppose I have a batch file called <code>'test.cmd'</code> and it simply contains:</p>
  
  <pre><code>echo %1
  </code></pre>
  
  <p>I can call this directly from the command prompt with <code>'test.cmd some¬arg'</code> and the result is that the string <code>'some¬arg'</code> is printed.</p>
  
  <p>However if I place that same call in a second batch file, called <code>'tester.cmd'</code> for the sake of argument, and I call this from the command prompt the result is that the string <code>'some%arg'</code> is printed.</p>
  
  <p>What is it that messes up the encoding and how do I get around it?  I am sure I've fixed this before, but I can't remember how...</p>
  
  <p>Thanks!</p>