switching 'unichr' for 'hex' in the invalid characters list