You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kylin.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2020/07/22 02:39:00 UTC

[jira] [Commented] (KYLIN-4548) When the SQL that needs to export the query results has Chinese, garbled characters will be generated

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

ASF GitHub Bot commented on KYLIN-4548:
---------------------------------------

ChangjiGuo edited a comment on pull request #1251:
URL: https://github.com/apache/kylin/pull/1251#issuecomment-662207612


   Can you take time to review this pr? thanks! @shaofengshi 


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> When the SQL that needs to export the query results has Chinese, garbled characters will be generated
> -----------------------------------------------------------------------------------------------------
>
>                 Key: KYLIN-4548
>                 URL: https://issues.apache.org/jira/browse/KYLIN-4548
>             Project: Kylin
>          Issue Type: Bug
>          Components: Query Engine
>    Affects Versions: v3.0.2, v2.6.6
>            Reporter: ChangjiGuo
>            Assignee: ChangjiGuo
>            Priority: Major
>         Attachments: image-2020-06-09-15-36-21-934.png
>
>
>     If we want to export the query results on the WEB UI, and sql contains Chinese, this will cause the exported results to be empty, because the query executed is not what we want. The following will be specifically explained:
>     For example, the sql we want to execute is:
> {code:sql}
> select count(1) from kylin_test.kylin_sales where  KYLIN_SALES.LSTG_FORMAT_NAME = '中文'
> {code}
> when you execute export, the sql received by kylin server contains garbled characters:
>  !image-2020-06-09-15-36-21-934.png! 
> Therefore, the controller needs to convert the encoding format.
> {code:java}
> sqlRequest.setSql(new String(sqlRequest.getSql().getBytes("iso8859-1"),"UTF-8"));
> {code}
> After testing, It works well.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)