> 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" %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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.
