Replace non-utf-8 characters in decode()