I'm using the clickhouse CLI on a XTERM terminal with a bash shell on Redhat EL6 OS.
The output is unreadable due to terminal escape sequences.
For instance:
SELECT count(*)
FROM system.tables
ââcount()ââ
â 35 â
âââââââââââ
1 rows in set. Elapsed: 0.002 sec.
Things get better when I use the --format=PrettySpace
option but eventual NULL
values are still unreadable:
SELECT DISTINCT ont_index
FROM port_status_events
WHERE isNull(ont_index) OR (ont_index < 2)
ORDER BY ont_index ASC NULLS FIRST
ââont_indexââ
â á´ºáµá´¸á´¸ â
â 0 â
â 1 â
âââââââââââââ
3 rows in set. Elapsed: 0.003 sec. Processed 11.57 thousand rows, 23.13 KB (3.50 million rows/s., 6.99 MB/s.)
Is there a way to tell the client I'm using a different type of terminal?
As @Thomas Dickey correctly said, this has nothing to do with terminal escape sequences but with character encoding.
I changed by PuTTY settings to UTF-8 and everything works correctly now.