Fix an encoding bug in index processing.
Please tell me if this create a bug in antoher system !