MySQL Tutorial/Information Functions/CHARSET
CHARSET(str): Returns the character set of the string argument.
mysql>
mysql> SELECT CHARSET("abc");
+----------------+
| CHARSET("abc") |
+----------------+
| latin1 |
+----------------+
1 row in set (0.00 sec)
mysql>
SELECT CHARSET(CONVERT("abc" USING utf8));
mysql>
mysql> SELECT CHARSET(CONVERT("abc" USING utf8));
+------------------------------------+
| CHARSET(CONVERT("abc" USING utf8)) |
+------------------------------------+
| utf8 |
+------------------------------------+
1 row in set (0.00 sec)
mysql>
SELECT CHARSET(USER());
mysql>
mysql> SELECT CHARSET(USER());
+-----------------+
| CHARSET(USER()) |
+-----------------+
| utf8 |
+-----------------+
1 row in set (0.00 sec)
mysql>