Skip to content

Commit

Permalink
apacheGH-41238: [Release] Use UTF-8 as the default encoding to upload…
Browse files Browse the repository at this point in the history
… binary (apache#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: apache#41238

Authored-by: Sutou Kouhei <[email protected]>
Signed-off-by: Sutou Kouhei <[email protected]>
  • Loading branch information
kou authored and tolleybot committed May 2, 2024
1 parent 2cf4b48 commit 5111106
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 3 deletions.
13 changes: 11 additions & 2 deletions dev/release/05-binary-upload.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,17 @@ set -e
set -u
set -o pipefail

export LANG=C
export LC_CTYPE=C
export LANG=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)"

Expand Down
12 changes: 11 additions & 1 deletion dev/release/binary/runner.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,17 @@

set -u

export LANG=C
export LANG=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})
Expand Down

0 comments on commit 5111106

Please sign in to comment.