convert to chars-based mode filter