I have a Python file that does some processing to words in a text file and prints them out to standard output. When it prints to standard output, the format is ASCII. However, when I try to write it to a file like this: python stem.py > output.txt
the output.txt file contains only characters that look like this:
^@c^@r^@a^@n^@f^@i^@e^@l^@d^@0^@2^@8^@1ptblustr^@^@^@.^@u^@s^@e^
How should I resolve this?