cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paulo Motta (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CASSANDRA-11030) utf-8 characters incorrectly displayed/inserted on cqlsh on Windows
Date Wed, 27 Jan 2016 23:38:39 GMT

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

Paulo Motta commented on CASSANDRA-11030:
-----------------------------------------

Thanks [~Stefania] and [~JoshuaMcKenzie]!

bq. At line 737 why use sys.stdout.encoding rather than self.encoding or encoding?

Actually self.encoding and sys.stdout.encoding are needed, because both cqlsh and other libs
may use {{codecs.lookup(encoding)}}, so codec not found will be thrown if the cp65001 is not
registered. Thanks for that!

This is necessary because independent of {{self.encoding}} value, if {{sys.stdout.encoding}}
is {{cp65001}}, the python process will fail with {{No such codec: cp65001}} or similar.

bq. At line 767 is the list of encodings complete, can they ever be specified as upper case?

I added the list of utf8 variations from [py2|https://docs.python.org/2/library/codecs.html]
and [py3|https://docs.python.org/3/library/codecs.html] (since there is no direct api for
that).

Updated above branches with dtests.

> utf-8 characters incorrectly displayed/inserted on cqlsh on Windows
> -------------------------------------------------------------------
>
>                 Key: CASSANDRA-11030
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-11030
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Paulo Motta
>            Assignee: Paulo Motta
>            Priority: Minor
>              Labels: cqlsh, windows
>
> {noformat}
> C:\Users\Paulo\Repositories\cassandra [2.2-10948 +6 ~1 -0 !]> .\bin\cqlsh.bat --encoding
utf-8
> Connected to test at 127.0.0.1:9042.
> [cqlsh 5.0.1 | Cassandra 2.2.4-SNAPSHOT | CQL spec 3.3.1 | Native protocol v4]
> Use HELP for help.
> cqlsh> INSERT INTO bla.test (bla ) VALUES  ('não') ;
> cqlsh> select * from bla.test;
>  bla
> -----
>  n?o
> (1 rows)
> {noformat}



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

Mime
View raw message