# mysql\_get\_character\_set\_info

## Syntax

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

* `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 %}

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


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://mariadb.com/docs/connectors/mariadb-connector-c/api-functions/mysql_get_character_set_info.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
