The locale decoder raises a UnicodeDecodeError instead of an OSError

Search the invalid character using mbrtowc().
1 file changed