powershellcassandra

Powershell character encoding


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?


Solution

  • 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.