fix utf8 encode for indexing