I was comparing two files that contained illegal UTF-8 chars (they were really some other encoding). Since my locale is set to UTF-8, these couldn't be displayed properly. Instead, they were displayed as a question mark "?". This caused two problems:
- I couldn't see the bad char, it looks like a perfectly legal question mark. Could it be displayed in hex in a different colour? That's what "less" does.
- The bad chars were the same in both files, and no difference was noted, but they happened to be near a real difference, and I copied lines from one file to the other. Instead of copying the bad char, I got the question mark copied, introducing a difference that wasn't there. However, unless I set my encoding to something where those chars are legal (e.g. "Western European (ISO)"), BC doesn't display a difference between the files.
- I couldn't see the bad char, it looks like a perfectly legal question mark. Could it be displayed in hex in a different colour? That's what "less" does.
- The bad chars were the same in both files, and no difference was noted, but they happened to be near a real difference, and I copied lines from one file to the other. Instead of copying the bad char, I got the question mark copied, introducing a difference that wasn't there. However, unless I set my encoding to something where those chars are legal (e.g. "Western European (ISO)"), BC doesn't display a difference between the files.
Comment