added ability to set the charset in configuration
added quote handling