Merge pull request #1 from jv2222/master

Update repo from original project
added check for valid charset values

To ensure that the $encoding parameter is valid, I have added a check that retrieves all valid charset values from the current mysql connection, and checks if the requested encoding is a valid value. If not it will simply fail silently, skipping entirely the SET NAMES statement.
Added intelligence check for valid CHARSET value

Since mysql refers to CHARSETS in lower case and without dashes, the library will take care of converting and uppercase dashed values to lowercase no-dash values. For example, "UTF-8" will be valid, because it will be automatically transformed to "utf8".
Merge pull request #16 from Lwangaman/master

Added intelligent check for valid CHARSET value against current mysql resource