Error handle encoding.