relocated unicode checking