mirror of https://github.com/apache/cassandra
Enable piping to cqlsh with locale.getpreferredencoding()
Patch by paul cannon, reviewd by brandonwilliams for CASSANDRA-4113
This commit is contained in:
parent
452619cd07
commit
be9fa05d06
|
|
@ -45,6 +45,7 @@ import time
|
|||
import optparse
|
||||
import ConfigParser
|
||||
import codecs
|
||||
import locale
|
||||
import re
|
||||
|
||||
# cqlsh should run correctly when run out of a Cassandra source tree,
|
||||
|
|
@ -408,7 +409,7 @@ class Shell(cmd.Cmd):
|
|||
|
||||
self.color = color
|
||||
if encoding is None:
|
||||
encoding = sys.stdout.encoding
|
||||
encoding = locale.getpreferredencoding()
|
||||
self.encoding = encoding
|
||||
self.output_codec = codecs.lookup(encoding)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue