Encode/decode index and tree entries using UTF-8