index style encode