fixed xml encoding detection bug, can be reproduced by the following code: "from nltk import book"