IndexHandler: encoding while reading snippets