dosubot[bot] commented on issue #608:
URL:
https://github.com/apache/incubator-hugegraph-toolchain/issues/608#issuecomment-2136761225
<!-- Greeting -->
Hey @xyk98! 👋 I'm here to help you with bug fixes, answer questions, and
guide you on becoming a contributor. Let's squash those bugs together!
<!-- Answer -->
To resolve the issue of Chinese characters displaying as "???" on the Hubble
web page after deploying HugeGraph and HugeGraph-Hubble via Docker, you need to
ensure that the encoding settings are correctly configured to UTF-8.
Here is how you can modify the Docker setup to ensure UTF-8 encoding:
1. **Modify the Dockerfile** to include the necessary environment variables
for UTF-8 encoding.
```dockerfile
FROM hugegraph/hubble
# Set environment variables for UTF-8 encoding
ENV LANG C.UTF-8
ENV LANGUAGE C.UTF-8
ENV LC_ALL C.UTF-8
# Other Dockerfile instructions
```
2. **Update the `docker-compose.yml`** file to ensure the environment
variables are set correctly.
```yaml
version: '3'
services:
server:
image: hugegraph/hugegraph
container_name: server
ports:
- 8080:8080
hubble:
image: hugegraph/hubble
container_name: hubble
ports:
- 8088:8088
environment:
- LANG=C.UTF-8
- LANGUAGE=C.UTF-8
- LC_ALL=C.UTF-8
```
Additionally, ensure that the `messages_zh_CN.properties` file is correctly
configured and included in your deployment. This file contains the necessary
Chinese translations for various messages and should be located in the
`hugegraph-hubble/hubble-be/src/main/resources/i18n/` directory
<sup>[[1]](https://github.com/apache/incubator-hugegraph-doc/blob/master/content/cn/docs/quickstart/hugegraph-hubble.md)</sup><sup>[[2]](https://github.com/apache/incubator-hugegraph-toolchain/blob/master/hugegraph-hubble/hubble-be/src/main/resources/i18n/messages_zh_CN.properties)</sup>.
By setting these environment variables and ensuring the correct properties
file is included, you ensure that the Docker containers use UTF-8 encoding and
the application can properly display Chinese characters, resolving the issue of
Chinese characters displaying as "???".
<!-- Dosu Comment Footer -->
<details open>
<summary>
#### Details
</summary>
**About Dosu**
This response is meant to be useful and save you time. It is **not meant to
be a precise solution**, but rather a starting point for your own research.
Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is
irrelevant.
</details>
*To continue the conversation, mention @dosu.*
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]