set encoding to index.html reading buffer