mysql_get_c...er_set_info(3)

πŸ“¦
version 13.0.2 Β· 4 versions
, in alpine 3.22, alpine 3.23, alpine 3.24, arch rolling, centos-stream 10, debian trixie, fedora 43, fedora 44, nixpkgs unstable, opensuse-leap 16.0, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– mysql_get_character_set_info β€” returns character set information πŸ’–

okay bestie, welcome to the MariaDB Connector/C section of the manual, page mysql_get_c...er_set_info(3). yes the name is long, yes it's giving "my parents named me after a wifi password", we move. 🫢


✨ NAME ✨

mysql_get_character_set_info β€” returns character set information 🌸


✨ SYNOPSIS ✨

#include <mysql.h>

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

✨ DESCRIPTION ✨

It literally just hands you the tea on the current default character set for the connection you point at. That's it, that's the whole job. No cap. πŸŽ€


✨ PARAMETERS ✨

  • mysql β€” a connection identifier. And not just any random one, bestie: this one was previously allocated by mysql_init(3) and then connected by mysql_real_connect(3). So like, it has to be a real, live, already-connected connection. Don't be out here passing uninitiated structs, that's not the vibe. πŸ’…
  • charset β€” a pointer to a MY_CHARSET_INFO structure. The info gets copied into it. So you bring the container, it brings the character set lore. πŸ¦‹

✨ NOTES ✨

  • The complete list of supported character sets in the client library lives in the function description for mysql_set_character_set(3). So if you're like "wait what charsets even exist tho", that's where you go. Go look. I'll wait. πŸ‘‘

✨ SEE ALSO ✨


heads up: this function returns void, so there's no return value to check. Nothing to catch, nothing to handle β€” it just does the thing and dips. 😭

Version 3.4 of the MariaDB Connector/C manual, bestie β€” that's the whole page, mysql_get_c...er_set_info(3) and all. go forth and get that character set info, you absolute icon. πŸŒˆβœ¨πŸ’–

πŸ“¦ where this page comes from