Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] Hubble web page Chinese display messy code #608

Closed
1 task done
xyk98 opened this issue May 29, 2024 · 6 comments
Closed
1 task done

[Question] Hubble web page Chinese display messy code #608

xyk98 opened this issue May 29, 2024 · 6 comments
Labels
hubble-fe inactive question Further information is requested

Comments

@xyk98
Copy link

xyk98 commented May 29, 2024

Problem Type (问题类型)

dashboard render (前端渲染问题)

Before submit

  • I had searched in the issues and found no similar issues.

Environment (环境信息)

  • Server Version: 1.2.0
  • Hubble Version: 1.2.0

Your Question (问题描述)

After deploying hugegraph and hugegraph-hubble via docker, create the Chinese attribute "姓名" on the hubble web page, and display the attribute name as "???".
Hubble web page:
11FD42E5-EB79-4a2e-AB3C-4B8DB8AE1CD3
Docker:
F02D5D43-3CA7-416d-87F1-350FEB1AC565
docker-compose.yml:
version: '3'
services:
hugegraph-server:
image: hugegraph/hugegraph:1.2.0
container_name: hugegraph
restart: always
ports:
- 18080:8080

hugegraph-hubble:
image: hugegraph/hubble:1.2.0
container_name: hugegraph-hubble
restart: always
ports:
- 18088:8088

Vertex/Edge example (问题点 / 边数据举例)

No response

Schema [VertexLabel, EdgeLabel, IndexLabel] (元数据结构)

No response

@dosubot dosubot bot added hubble-fe question Further information is requested labels May 29, 2024
Copy link

dosubot bot commented May 29, 2024

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!

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.
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
  1. Update the docker-compose.yml file to ensure the environment variables are set correctly.
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 [1][2].

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 "???".

Details

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.

To continue the conversation, mention @dosu.

Copy link

Due to the lack of activity, the current issue is marked as stale and will be closed after 20 days, any update will remove the stale label

Copy link

Due to the lack of activity, the current issue is marked as stale and will be closed after 20 days, any update will remove the stale label

@imbajin
Copy link
Member

imbajin commented Jul 1, 2024

@xyk98 any update after @dosu 's suggestion? (Or close it if fixed)

Copy link

dosubot bot commented Jul 1, 2024

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.
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
  1. Update the docker-compose.yml file to ensure the environment variables are set correctly.
version: '3'
services:
  hugegraph-server:
    image: hugegraph/hugegraph:1.2.0
    container_name: hugegraph
    restart: always
    ports:
      - 18080:8080

  hugegraph-hubble:
    image: hugegraph/hubble:1.2.0
    container_name: hugegraph-hubble
    restart: always
    ports:
      - 18088: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 .

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 "???".

Let us know if this resolves your issue or if you need further assistance!

To continue talking to Dosu, mention @dosu.

@github-actions github-actions bot removed the inactive label Jul 1, 2024
Copy link

Due to the lack of activity, the current issue is marked as stale and will be closed after 20 days, any update will remove the stale label

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Aug 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hubble-fe inactive question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants