2

I'm using powershell to run the cassandra shell. The cassandra host is a linux box. When running a query, I get this:

cqlsh> use mykeyspace;
cqlsh:mykeyspace> select * from person;

 ←[0;1;35mid←[0m | ←[0;1;35mphone←[0m
----+-------------------------------
  ←[0;1;32m1←[0m | ←[0;1;34m{←[0m←[0;1;33malias←[0m←[0;1;34m: ←[0m←[0;1;33m'asd'←[0m←[0;1;34m, ←[0m←[0;1;33mnumber←[0m←[0;1;34m: ←[0m←[0;1;33m'asd'←[0m←[0;1;34m}←[0m

(1 rows)

If I run the same thing through cmd, the output is fine. It's only when run through powershell do these weird characters appear. I'm guessing this is an encoding issue. Does anybody know how to resolve this?

2
  • 3
    Duplicate of Disable colors in cqlsh. The additional characters are escape sequences for coloring output in Linux/Unix terminals. Commented Oct 21, 2014 at 16:52
  • Yup...that was it. cqlsh --no-color resolves the issue. Thanks. Commented Oct 21, 2014 at 17:09

2 Answers 2

2

Can't find a way to mark this as answered without adding an answer. Following Ansgar's link, starting cqlsh with:

cqlsh hostip --no-color

resolves the issue.

Sign up to request clarification or add additional context in comments.

Comments

0

problem is that terminal used doesnot support color scheme used by cqlsh

on cli use

--no-color  

https://cassandra.apache.org/doc/latest/cassandra/managing/tools/cqlsh.html#command-line-options

or specify in

~/.cassandra/cqlshrc

[ui]
color = false

https://cassandra.apache.org/doc/latest/cassandra/managing/tools/cqlsh.html#cqlshrc

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.