# Path: resources/lib/mysql-connector-python/python3/mysql/connector/errors.py
# class ProgrammingError(DatabaseError):
#     """Exception for errors programming errors"""
#     pass


from .errors import ProgrammingError
          continue
        if c[0] == charset and c[2] is True:
          return c[1], c[0], cid

      raise ProgrammingError("Character set '%s' unsupported." % (charset))
    
    @classmethod
    def get_charset_info(cls, charset=None, collation=None):
        """Get character set information using charset name and/or collation
        
        Retrieves character set and collation information given character
        set name and/or a collation name.
        If charset is an integer, it will look up the character set based
        on the MySQL's ID.
        For example:
            get_charset_info('utf8',None)
            get_charset_info(collation='utf8_general_ci')
            get_charset_info(47)
        
        Raises ProgrammingError when character set is not supported.

        Returns a tuple with (id, characterset name, collation)
        """
        idx = None
        
        if isinstance(charset, int):
            try:
                info = cls.desc[charset]
                return (charset, info[0], info[1])
            except IndexError:

# Path: resources/lib/mysql-connector-python/python3/mysql/connector/errors.py
# class ProgrammingError(DatabaseError):
#     """Exception for errors programming errors"""
#     pass


# Path: resources/lib/mysql-connector-python/python3/mysql/connector/constants.py
from .errors import ProgrammingError

          continue
        if c[0] == charset and c[2] is True:
          return c[1], c[0], cid

      raise ProgrammingError("Character set '%s' unsupported." % (charset))
    
    @classmethod
    def get_charset_info(cls, charset=None, collation=None):
        """Get character set information using charset name and/or collation
        
        Retrieves character set and collation information given character
        set name and/or a collation name.
        If charset is an integer, it will look up the character set based
        on the MySQL's ID.
        For example:
            get_charset_info('utf8',None)
            get_charset_info(collation='utf8_general_ci')
            get_charset_info(47)
        
        Raises ProgrammingError when character set is not supported.

        Returns a tuple with (id, characterset name, collation)
        """
        idx = None
        
        if isinstance(charset, int):
            try:
                info = cls.desc[charset]
                return (charset, info[0], info[1])
            except IndexError:

                ProgrammingError("Character set ID {0} unknown.".format(