[ 
https://issues.apache.org/jira/browse/CASSANDRA-11124?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15151533#comment-15151533
 ] 

Stefania commented on CASSANDRA-11124:
--------------------------------------

The patch is +1 but we could read the encoding from config file as well. We 
just need to replace {{optvalues.encoding = UTF8}} with {{optvalues.encoding = 
option_with_default(configs.get, 'ui', 'encoding', UTF8)}}. 

Perhaps we also ought to print out the encoding when {{--debug}} is specified. 
To do this we just need to add a line in the {{main}} method:

{code}
if options.debug:
         sys.stderr.write("Using CQL driver: %s\n" % (cassandra,))
         sys.stderr.write("Using connect timeout: %s seconds\n" % 
(options.connect_timeout,))
+       sys.stderr.write("Using %s encoding\n" % (options.encoding,))
{code}

bq. Do you see any scenario where this can cause problems?
I cannot think of a scenario but I am not an expert in encoding related 
problems. However, up till now we've been telling people with problems to 
change to UTF-8 and so I think we are better off using UTF-8 as the default. 
Besides, if we support changing the encoding both from command line and config 
file it should be easy enough to override the default in case of problems.

> Change default cqlsh encoding to utf-8
> --------------------------------------
>
>                 Key: CASSANDRA-11124
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-11124
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Tools
>            Reporter: Paulo Motta
>            Assignee: Paulo Motta
>            Priority: Trivial
>              Labels: cqlsh
>
> Strange things can happen when utf-8 is not the default cqlsh encoding (see 
> CASSANDRA-11030). This ticket proposes changing the default cqlsh encoding to 
> utf-8.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to