Chinese Characters Entered in the Hue Text Box Are Displayed Incorrectly
Issue
Chinese characters entered in the Hue text box cannot be displayed correctly.
Symptom
When Chinese characters are entered for the first time, only English characters are displayed first. When the user enters Chinese characters again, the content entered the previous time is also displayed in addition to the Chinese characters. The following is an example:
Cause Analysis
Hue has a bug in processing Chinese characters.
Procedure
This solution applies only to MRS cluster versions 2.x and earlier.
- Log in to MRS Manager, choose Services > Hue > Instance, and obtain the IP address of the node where the Hue instance is located.
- Use a remote connection tool to log in to the node where the Hue instance resides as user root and run the following command to switch to user omm:
su - omm
- Run the following command to switch to the target directory:
cd /opt/Bigdata/MRS_Current/1_*_Hue/install/hue/build/static/desktop/js/ace
- Run the following command to locate the hash file of ace.js:
ll ace.*.js
The following is an example:
- Run the following command to open and edit the ace.*.js file (the hash file):
vim ace.18f1745e9832.js
- Search for the keyword "t.onCompositionUpdate" in the ace.*.js file.
- Modify if (h.lastValue == e) (the content underlined in blue in the red box in the preceding figure) to if (true).
The file after modification is as follows:
- Save the modifications.
- Refresh the page and enter Chinese characters again.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot