Tweak charset detection, update docs.