On Windows, use the console code page for text file encoding/decoding.