Chinese characters are not displayed properly in the web pages of wso2am-analytics-2.6.02020-03-24 wso2 wso2-am
I have installed API Manager and APIM Analytics on CentOS 7.6, the version is 2.6.0. I find that Chinese characters are not displayed properly in the pages of the Analyze dropdown menu.
But the Chinese characters are able to be displayed properly in other pages
So this problem is focused on "APIM Analytics". I have checked the data in H2 database, I find that the data of H2 is correct, but the returned Json data is not correct.
I also checked a Shell file
/usr/lib64/wso2/wso2am/wso2am-analytics-2.6.0/wso2/worker/bin/carbon.sh, I found that
-Dfile.encoding=UTF8 has been configured.
I doubt whether the data is not encoded in the transmission process. Has anyone met this problem?
--- Additional content (2020/3/25) ---
I just checked deployment.yaml, which is at
/usr/lib64/wso2/wso2am/wso2am-analytics-2.6.0/conf/worker. I did not find out any configuration item of character set.
I also reviewed usage.jag, which is at
/usr/lib64/wso2/wso2am/2.6.0/repository/deployment/server/jaggeryapps/store/modules/statistics. As you can see, there is not any program logic of data query. I guess I'll have to read the source codes of wso2am-analytics-2.6.0. I don't think it is an efficient way.
--- Additional content (2020/3/26) ---
I found that some strange symbols are appended to the returned Json data(shown in the screenshot below). The returned Json data is as follows:
å\u0085¨ç\u0090\u0083é£\u008eå\u0090\u0091æ\u009f¥è¯¢ (admin), normal Json data should look like this:
I find a suspicious point in the source code, the details are as follows:
Github repository is "
wso2 / carbon-apimgt", Java file is "
org.wso2.carbon.apimgt.impl.utils.APIUtil", the method is "
The key code is “
String responseStr = EntityUtils.toString(entity);”.
According to document of HttpClient,
EntityUtils.toString() method is going to use the default character set, which is ISO-8859-1, if other character set (For instance: UTF-8) is not specified for it.
So the point is that ISO-8859-1 can not process Chinese information properly.
I hope the developers of WSO2 can notice that ASAP.
- WSO2 APIM 2.6.0 integration with WSO2 APIM Analytics 2.6.0 ( Stream Processor 4.3.0)
- WSO2 APIM Identity responds back username or domain/username in the NameID of a SAML SSO response
- wso2am-2.6.0 invalid jwt signature
- Change password in WSO2 AM-Analytics
- wso2am-2.6.0 unable to generate token when GroupExtractor is enabled
- wso2am 2.6.0 file-based SAML IdP configuration
- WSO2 API Manager 2.1 Analytics - Fails to Start up while connecting to Oracle DB