mysql> pager > /dev/null
PAGER set to '> /dev/null'
mysql> SELECT 1;
1 row in set (0.00 sec)
mysql> pager
Default pager wasn't set, using stdout.
mysql> SELECT 1;
+---+
| 1 |
+---+
| 1 |
+---+
1 row in set (0.00 sec)
SELECT CONVERT_TZ('2024-05-07 10:36:29', 'UTC', 'America/Los_Angeles');
If you see several weird characters in a row that look like incorrect character encoding there's a good chance it's UTF-8 interpreted as cp-1252. For example, “
in cp-1252 is 0xE2 0x80 0x9C
. Those same 3 bytes in UTF-8, 0xE2809C
is “
. In MySQL you can do a quick conversion to check:
mysql> SELECT CONVERT(UNHEX(HEX(CONVERT("“" USING LATIN1))) USING utf8mb4);
+--------------------------------------------------------------------+
| CONVERT(UNHEX(HEX(CONVERT("“" USING LATIN1))) USING utf8mb4) |
+--------------------------------------------------------------------+
| “ |
+--------------------------------------------------------------------+
https://github.com/nitso/colour-mysql-console
brew install grc
then copy the .grcat
and .my.cnf
to your home dir.