Use the native set_charset() method if available instead of SET NAMES