> For the complete documentation index, see [llms.txt](https://mariadb.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mariadb.com/docs/connectors/mariadb-connector-c/api-functions/mysql_get_character_set_info.md).

# mysql\_get\_character\_set\_info

## Syntax

```c
void mysql_get_character_set_info(MYSQL * mysql,
                                  MY_CHARSET_INFO * charset);
```

## Parameters

* `mysql` - a `mysql` handle, which was previously allocated by [mysql\_init()](/docs/connectors/mariadb-connector-c/api-functions/mysql_init.md) or [mysql\_real\_connect()](/docs/connectors/mariadb-connector-c/api-functions/mysql_real_connect.md).
* `charset` - a pointer to a `MY_CHARSET_INFO` structure, in which the information will be copied.

## Description

Returns information about the current default [character set](/docs/server/reference/data-types/string-data-types/character-sets.md) for the specified connection.

{% hint style="info" %}
A complete list of supported character sets in the client library is listed in the function description for [mysql\_set\_character\_set\_info()](/docs/connectors/mariadb-connector-c/api-functions/mysql_set_character_set.md).
{% endhint %}

## See Also

* [mariadb\_get\_infov()](/docs/connectors/mariadb-connector-c/api-functions/mariadb_get_infov.md)
* [mysql\_set\_character\_set\_info()](/docs/connectors/mariadb-connector-c/api-functions/mysql_set_character_set.md)

{% @marketo/form formId="4316" %}
