Documentation Home
MySQL Connector/Python Developer Guide
Related Documentation Download this Manual
PDF (US Ltr) - 0.7Mb
PDF (A4) - 0.7Mb


MySQL Connector/Python Developer Guide  /  Connector/Python C Extension API Reference  /  _mysql_connector.MySQL.character_set_name() Method

11.7 _mysql_connector.MySQL.character_set_name() Method

Syntax:

charset = ccnx.character_set_name()

Returns the name of the default character set for the current MySQL session.

Some MySQL character sets have no equivalent names in Python. When this is the case, a name usable by Python is returned. For example, the 'utf8mb4' MySQL character set name is returned as 'utf8'.