Fix issue with strange encoding names

See pyQode/pyQode#11