CHARSET

Takes a string argument and returns the character set of that argument.

Syntax

CHARSET(string)

Arguments

  • String

Return Type

  • Character set

Examples

select charset(char(189));
+--------------------+
| charset(char(189)) |
+--------------------+
| binary             |
+--------------------+
1 row in set (0.06 sec)

select charset(char(189 using utf8));
+-------------------------------+
| charset(char(189 using utf8)) |
+-------------------------------+
| utf8                          |
+-------------------------------+
1 row in set (0.06 sec)

See Also