apps > disable_autoformat

If you regularly receive unix commands that you need to copy-n-paste out of a Word document, then you should disable AutoFormat/AutoCorrect, because it is otherwise difficult to ensure that quote and dash characters aren't damaged.

how to prevent the problem from happening in the first place

how to detect whether the problem occurred

In Word 2007:
  1. go to the "Home" ribbon, and click "Find"
  2. click the "More > >" button, and enable the "Use wildcards" option
  3. paste this into the search box:
  4. click Reading Highlight > Highlight All

how to fix a document where the problem has already occurred

If you have an existing document that already has damaged characters in it, you can change them back to the original characters using one of these macros: