Added encoding sniffing

Should explode a little less now. And stuff should look better.