[
https://issues.apache.org/jira/browse/KYLIN-4548?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
ChangjiGuo updated KYLIN-4548:
------------------------------
Component/s: Query Engine
> 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)