simplified encoding check