bug fix for invalid byte sequence in Windows31J