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 Mon, 01 Feb 2016 14:53:39 GMT

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

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

how was the data inserted (this is not shown in the excerpt you posted)? because if data was
inserted with the wrong encoding, it may not be read with the correct encoding. 

I have a feeling the system preferred encoding (in your case cp1252) might be the culprit
here, since its different from the terminal encoding 437 and also from cp65001. I wonder if
we should use utf-8 as default encoding if one is not specified. Can you try replacing:

{noformat}
        if encoding is None:
            encoding = locale.getpreferredencoding()
            if encoding is None:
                encoding = 'utf-8'
{noformat}
with
{noformat}
        if encoding is None:
             encoding = 'utf-8'
{noformat}
and check if that changes anything?

> 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