Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

feat: use more universal C.UTF-8 instead of en_US.UTF-8 (#30621)

wangxiaolei2cc89d30dbfe
diff --git a/api/docker/entrypoint.sh b/api/docker/entrypoint.sh
index 5a69eb15acb..c0279f893bb 100755
--- a/api/docker/entrypoint.sh
+++ b/api/docker/entrypoint.sh
@@ -3,8 +3,9 @@
set -e
# Set UTF-8 encoding to address potential encoding issues in containerized environments
-export LANG=${LANG:-en_US.UTF-8}
-export LC_ALL=${LC_ALL:-en_US.UTF-8}
+# Use C.UTF-8 which is universally available in all containers
+export LANG=${LANG:-C.UTF-8}
+export LC_ALL=${LC_ALL:-C.UTF-8}
export PYTHONIOENCODING=${PYTHONIOENCODING:-utf-8}
if [[ "${MIGRATION_ENABLED}" == "true" ]]; then
diff --git a/docker/.env.example b/docker/.env.example
index 66d937e8e71..09ee1060e29 100644
--- a/docker/.env.example
+++ b/docker/.env.example
@@ -58,8 +58,8 @@ FILES_URL=
INTERNAL_FILES_URL=
# Ensure UTF-8 encoding
-LANG=en_US.UTF-8
-LC_ALL=en_US.UTF-8
+LANG=C.UTF-8
+LC_ALL=C.UTF-8
PYTHONIOENCODING=utf-8
# ------------------------------
diff --git a/docker/docker-compose-template.yaml b/docker/docker-compose-template.yaml
index 3c88cddf8cf..709aff23dfa 100644
--- a/docker/docker-compose-template.yaml
+++ b/docker/docker-compose-template.yaml
@@ -475,7 +475,8 @@ services:
OB_CLUSTER_NAME: ${OCEANBASE_CLUSTER_NAME:-difyai}
OB_SERVER_IP: 127.0.0.1
MODE: mini
- LANG: en_US.UTF-8
+ LANG: C.UTF-8
+ LC_ALL: C.UTF-8
ports:
- "${OCEANBASE_VECTOR_PORT:-2881}:2881"
healthcheck:
diff --git a/docker/docker-compose.yaml b/docker/docker-compose.yaml
index 54b9e744f8e..712de84c62d 100644
--- a/docker/docker-compose.yaml
+++ b/docker/docker-compose.yaml
@@ -13,8 +13,8 @@ x-shared-env: &shared-api-worker-env
APP_WEB_URL: ${APP_WEB_URL:-}
FILES_URL: ${FILES_URL:-}
INTERNAL_FILES_URL: ${INTERNAL_FILES_URL:-}
- LANG: ${LANG:-en_US.UTF-8}
- LC_ALL: ${LC_ALL:-en_US.UTF-8}
+ LANG: ${LANG:-C.UTF-8}
+ LC_ALL: ${LC_ALL:-C.UTF-8}
PYTHONIOENCODING: ${PYTHONIOENCODING:-utf-8}
LOG_LEVEL: ${LOG_LEVEL:-INFO}
LOG_OUTPUT_FORMAT: ${LOG_OUTPUT_FORMAT:-text}
@@ -1157,7 +1157,8 @@ services:
OB_CLUSTER_NAME: ${OCEANBASE_CLUSTER_NAME:-difyai}
OB_SERVER_IP: 127.0.0.1
MODE: mini
- LANG: en_US.UTF-8
+ LANG: C.UTF-8
+ LC_ALL: C.UTF-8
ports:
- "${OCEANBASE_VECTOR_PORT:-2881}:2881"
healthcheck: