You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kylin.apache.org by "ChangjiGuo (Jira)" <ji...@apache.org> on 2020/06/09 07:40:00 UTC
[jira] [Created] (KYLIN-4548) When the SQL that needs to export the
query results has Chinese, garbled characters will be generated
ChangjiGuo created KYLIN-4548:
---------------------------------
Summary: 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
Affects Versions: v2.6.6, v3.0.2
Reporter: ChangjiGuo
Assignee: ChangjiGuo
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)