character_set

Overview

This connection value (read/write) sets the character set to use.

See also: MariaDB Connector/Python 1.1 and in 1.0

EXAMPLES

Set and print the character set for the connection object:

import mariadb

conn = mariadb.connect(
    host = 'localhost',
    user = 'root',
    password = 'secret',
    )

conn.character_set = 'utf8mb4'
print(conn.character_set) # Prints: utf8mb4

CHANGE HISTORY

Release Series

History

1.1

  • Present starting in MariaDB Connector/Python 1.1.0rc1.

1.0

  • Present starting in MariaDB Connector/Python 1.0.0.