Add optional encoding parameter for current connection, default UTF-8

Set optional encoding parameter for the current database connection, defaults to UTF-8. In fact UTF-8 encoded databases will not display values correctly in a php application if this is not set explicitly.