You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Paulo Motta (JIRA)" <ji...@apache.org> on 2016/01/19 22:27:40 UTC

[jira] [Comment Edited] (CASSANDRA-10948) CQLSH error when trying to insert non-ascii statement

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

Paulo Motta edited comment on CASSANDRA-10948 at 1/19/16 9:26 PM:
------------------------------------------------------------------

Tests look good, marking as ready to commit. Thanks!

Committer: 2.2 patch merges cleanly upwards.


was (Author: pauloricardomg):
Tests look good, marking as ready to commit. Thanks!

> CQLSH error when trying to insert non-ascii statement
> -----------------------------------------------------
>
>                 Key: CASSANDRA-10948
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-10948
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Tools
>            Reporter: Matthieu Nantern
>            Assignee: Matthieu Nantern
>            Priority: Minor
>              Labels: lhf
>         Attachments: patch_CASSANDRA-10948
>
>
> We recently upgraded Cassandra to v2.2.4 with CQLSH 5.0.1 and we are now unable to import some CQL file (with French character like 'ê'). It was working on v2.0.12.
> The issue:
> {noformat}
> Using CQL driver: <module 'cassandra' from '/OPT/cassandra/dsc-cassandra-2.2.4/bin/../lib/cassandra-driver-internal-only-3.0.0-6af642d.zip/cassandra-driver-3.0.0-6af642d/cassandra/__init__.py'>
> Using connect timeout: 5 seconds
> Traceback (most recent call last):
>   File "/OPT/cassandra/dsc-cassandra/bin/cqlsh.py", line 1110, in onecmd
>     self.handle_statement(st, statementtext)
>   File "/OPT/cassandra/dsc-cassandra/bin/cqlsh.py", line 1135, in handle_statement
>     readline.add_history(new_hist)
> UnicodeEncodeError: 'ascii' codec can't encode character u'\xea' in position 7192: ordinal not in range(128)
> {noformat}
> The issue was corrected by changing line 1135 of cqlsh.py (but I don't know if it's the correct way to do it):
> readline.add_history(new_hist)  -> readline.add_history(new_hist.encode('utf8'))



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