Handle utf-8 code in index/rindex