Fixing JIS mojibake with Python

JIS (iso-2022-jp) is a Japanese text encoding. The beginning and end of a JIS sequence are marked by escape sequences: Beginning: 1B $ B (or 1B $ @) Ending: 1B ( J (or 1B ( B) This encoding is often used in email. Unfortunately, some email programs (and even mail routers) strip out the escape […]