[notepad] detect broken encodings