RFR: 8321373: Build should use LC_ALL=C.UTF-8 [v3]
Claes Redestad
redestad at openjdk.org
Mon Feb 5 12:53:02 UTC 2024
On Mon, 5 Feb 2024 10:38:26 GMT, Magnus Ihse Bursie <ihse at openjdk.org> wrote:
>> We're currently setting LC_ALL=C. Not all tools will default to utf-8 as their encoding of choice when they see this locale, but use an arbitrarily encoding, which might not properly handle all UTF-8 characters. Since in practice, all our encoding is utf8, we should tell our tools this as well.
>>
>> This will at least have effect on how Java treats path names including unicode characters.
>
> Magnus Ihse Bursie has updated the pull request incrementally with two additional commits since the last revision:
>
> - Update copyright year
> - check for utf-8 first
I think the tradeoff here of explicitly loading `StandardCharsets` but not doing a lookup that triggers `StandardCharsets$Aliases` and a few others to load seem appropriate as it optimize for the recommended use pattern, while not penalizing too severely `Charset.forName`-based flows.
-------------
Marked as reviewed by redestad (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/16971#pullrequestreview-1862693331
More information about the build-dev
mailing list