mirror of https://github.com/apache/cassandra
cqlsh fails to decode utf-8 characters for text typed columns
patch by Yasuharu Goto; reviewed by Paulo Motta for CASSANDRA-10875
This commit is contained in:
parent
3ccffc94b8
commit
f1b9e9a65a
|
|
@ -1,4 +1,5 @@
|
|||
2.1.13
|
||||
* cqlsh fails to decode utf-8 characters for text typed columns (CASSANDRA-10875)
|
||||
* Log error when stream session fails (CASSANDRA-9294)
|
||||
* Fix bugs in commit log archiving startup behavior (CASSANDRA-10593)
|
||||
* (cqlsh) further optimise COPY FROM (CASSANDRA-9302)
|
||||
|
|
|
|||
|
|
@ -668,6 +668,8 @@ class Shell(cmd.Cmd):
|
|||
self.session.max_trace_wait = max_trace_wait
|
||||
if encoding is None:
|
||||
encoding = locale.getpreferredencoding()
|
||||
if encoding is None:
|
||||
encoding = 'utf-8'
|
||||
self.encoding = encoding
|
||||
self.output_codec = codecs.lookup(encoding)
|
||||
|
||||
|
|
@ -929,7 +931,7 @@ class Shell(cmd.Cmd):
|
|||
|
||||
def get_input_line(self, prompt=''):
|
||||
if self.tty:
|
||||
self.lastcmd = raw_input(prompt)
|
||||
self.lastcmd = raw_input(prompt).decode(self.encoding)
|
||||
line = self.lastcmd + '\n'
|
||||
else:
|
||||
self.lastcmd = self.stdin.readline()
|
||||
|
|
|
|||
Loading…
Reference in New Issue