added a setting for charset, not completed but perhaps 50% of the way there.