ignore invalid codes for charset