perl -e 'binmode STDOUT, ":encoding(cp437)"; print chr(0xA3), "\n"' \ | od -c -t x1 0000000 234 \r \n 9c 0d 0a #### perl -e 'binmode STDOUT,":encoding(latin-1)"; print chr(0xA3),"\n"' \ | od -c -t x1 #### 0000000 243 \r \n a3 0d 0a #### perl -e 'binmode STDOUT, ":encoding(cp437)"; print chr(0x9C), "\n"' \ | od -c -t x1 #### "\x{009c}" does not map to cp437. 0000000 \ x { 0 0 9 c } \r \n 5c 78 7b 30 30 39 63 7d 0d 0a