Merge pull request #1083 from narfbg/develop-db-set-charset

Fixed a db_set_charset() bug