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 <kou@clear-code.com>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
  • Loading branch information
kou authored and rok committed May 8, 2024
1 parent ccb7811 commit edc170e
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
11 changes: 10 additions & 1 deletion dev/release/05-binary-upload.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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)"

Expand Down
11 changes: 10 additions & 1 deletion dev/release/binary/runner.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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})
Expand Down

0 comments on commit edc170e

Please sign in to comment.