From edc170e24eee24ec966841222d07ee018aa65b43 Mon Sep 17 00:00:00 2001 From: Sutou Kouhei Date: Wed, 17 Apr 2024 11:57:58 +0900 Subject: [PATCH] GH-41238: [Release] Use UTF-8 as the default encoding to upload binary (#41242) ### Rationale for this change We may have non ASCII characters in the process. For example, PGP uid may include non ASCII characters. ### What changes are included in this PR? Use `LANG=C.UTF-8` and `LC_*=C.UTF-8` to use UTF-8 as the default encoding. ### Are these changes tested? Yes. I used this for 16.0.0 RC0. ### Are there any user-facing changes? No. * GitHub Issue: #41238 Authored-by: Sutou Kouhei Signed-off-by: Sutou Kouhei --- dev/release/05-binary-upload.sh | 11 ++++++++++- dev/release/binary/runner.sh | 11 ++++++++++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/dev/release/05-binary-upload.sh b/dev/release/05-binary-upload.sh index 3515883bfa861..a45b8fbf8d92d 100755 --- a/dev/release/05-binary-upload.sh +++ b/dev/release/05-binary-upload.sh @@ -22,7 +22,16 @@ set -u set -o pipefail export LANG=C.UTF-8 -export LC_ALL=C.UTF-8 +export LC_ADDRESS=C.UTF-8 +export LC_CTYPE=C.UTF-8 +export LC_IDENTIFICATION=C.UTF-8 +export LC_MEASUREMENT=C.UTF-8 +export LC_MONETARY=C.UTF-8 +export LC_NAME=C.UTF-8 +export LC_NUMERIC=C.UTF-8 +export LC_PAPER=C.UTF-8 +export LC_TELEPHONE=C.UTF-8 +export LC_TIME=C.UTF-8 SOURCE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" diff --git a/dev/release/binary/runner.sh b/dev/release/binary/runner.sh index d4c0f67dde7ba..76f7bce1ab21f 100755 --- a/dev/release/binary/runner.sh +++ b/dev/release/binary/runner.sh @@ -20,7 +20,16 @@ set -u export LANG=C.UTF-8 -export LC_ALL=C.UTF-8 +export LC_ADDRESS=C.UTF-8 +export LC_CTYPE=C.UTF-8 +export LC_IDENTIFICATION=C.UTF-8 +export LC_MEASUREMENT=C.UTF-8 +export LC_MONETARY=C.UTF-8 +export LC_NAME=C.UTF-8 +export LC_NUMERIC=C.UTF-8 +export LC_PAPER=C.UTF-8 +export LC_TELEPHONE=C.UTF-8 +export LC_TIME=C.UTF-8 target_dir=/host/binary/tmp original_owner=$(stat --format=%u ${target_dir})