Skip to content

Commit 7a54881

Browse files
kouraulcd
authored andcommitted
GH-39074: [Release][Packaging] Use UTF-8 explicitly for KEYS (#39082)
### Rationale for this change `KEYS` may have UTF-8 (non ASCII) characters. Ruby chooses the default encoding based on `LANG`. If `LANG=C`, Ruby uses the `US-ASCII` encoding as the default encoding. If Ruby uses the `US-ASCII` encoding, we can't process `KEYS` because it has non ASCII characters. ### What changes are included in this PR? Use the `UTF-8` encoding explicitly for `KEYS`. If we specify the `UTF-8` encoding explicitly, our `KEYS` processing don't depend on `LANG`. ### Are these changes tested? Yes. ### Are there any user-facing changes? No. * Closes: #39074 Authored-by: Sutou Kouhei <kou@clear-code.com> Signed-off-by: Sutou Kouhei <kou@clear-code.com>
1 parent 9123615 commit 7a54881

File tree

1 file changed

+1
-1
lines changed
  • dev/tasks/linux-packages/apache-arrow-release

1 file changed

+1
-1
lines changed

dev/tasks/linux-packages/apache-arrow-release/Rakefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class ApacheArrowReleasePackageTask < PackageTask
4343
keys_path = "#{@archive_base_name}/KEYS"
4444
download("https://www.apache.org/dyn/closer.lua?action=download&filename=arrow/KEYS",
4545
keys_path)
46-
keys = File.read(keys_path)
46+
keys = File.read(keys_path, encoding: "UTF-8")
4747
File.open(keys_path, "w") do |keys_file|
4848
is_ed25519_key = false
4949
deny_lists = [

0 commit comments

Comments
 (0)