You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2019/02/12 21:26:00 UTC

[jira] [Updated] (CALCITE-2704) Multilingual decoded problem

     [ https://issues.apache.org/jira/browse/CALCITE-2704?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

ASF GitHub Bot updated CALCITE-2704:
------------------------------------
    Labels: pull-request-available  (was: )

> Multilingual decoded problem
> ----------------------------
>
>                 Key: CALCITE-2704
>                 URL: https://issues.apache.org/jira/browse/CALCITE-2704
>             Project: Calcite
>          Issue Type: Bug
>          Components: avatica
>    Affects Versions: avatica-1.11.0, avatica-1.12.0
>            Reporter: pufan
>            Priority: Blocker
>              Labels: pull-request-available
>
> When we execute SQL with Chinese characters, we find that the server parses it in gibberish.
> After checking the code, we found that:
> org.apache.calcite.avatica.server.AvaticaJsonHandler.java line 109:
> {code:java}
> //The readFully method USES utf-8 encoding internally.
> rawRequest = AvaticaUtils.readFully(inputStream, buffer);
> {code}
> But in the org.apache.calcite.avatica.server.AvaticaJsonHandler.java line 116:
> {code:java}
> // Decoded using iso-8859-1 Cause Chinese garble.
> final String jsonRequest = new String(rawRequest.getBytes("ISO-8859-1"), "UTF-8");
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)