DRY character mask formatting