Skip to content

Merge release/6.4.x into main - #2226

Merged
jmschonfeld merged 17 commits into
mainfrom
automerge/merge-main-2026-09-05_09-07
Sep 6, 2026
Merged

Merge release/6.4.x into main#2226
jmschonfeld merged 17 commits into
mainfrom
automerge/merge-main-2026-09-05_09-07

Conversation

@github-actions

@github-actions github-actions Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

This PR was automatically opened by a GitHub action. Review the changes included in this PR and determine if they should be included in the release branch. If yes, merge the PR. Otherwise revert changes that should not be included on this branch.

jrflat and others added 17 commits August 27, 2026 14:35
* Correct BOM detection for files with unknown encoding

* Use MemoryLayout rather than a hardcoded value

(cherry picked from commit 04125bb)
…nary and number is trailing (#2157)

(cherry picked from commit cd2b20b)
`_encodeWithLineBreaks` hardcoded `omitPaddingCharacter` to `false` and
always wrote the `=` padding characters, while `encodeComputeCapacity`
already shrinks the output buffer by 1-2 bytes when
`.omitPaddingCharacter` is set and the input length is not a multiple
of 3.

Combining `.omitPaddingCharacter` with `.lineLength64Characters` or
`.lineLength76Characters` therefore wrote past the end of the output
buffer, for every input whose length is not a multiple of 3. In debug
builds that trips the `UnsafeMutableBufferPointer` bounds check and
traps; in release builds the check is compiled out and the write lands
past the end of the allocation.

The hardcoded `false` is a leftover from the change that introduced the
option, which updated the identical line in `_encode` but not this one.
Honoring the option here makes `encodeComputeCapacity` exactly correct
as already written: the computed capacity now equals the number of
bytes written for every input length and every combination of
line-length and line-ending options.
Fixes #2149

(cherry picked from commit 74a3183)
* add a test that would fail

* fr_CA: 24-hour setting is incorrect

Previously we worked around an ICU issue where it didn't handle the "rg" keyword in locale identifiers.

Our implementation treats "fr_CA" as "und_CA" under the assumption that the language code doesn't take effect for determining the properties such as the preferred hour cycle of the locale.

However this assumption is incorrect; in this case, fr_CA has a different hour cycle preferences from en_CA.

Remove this workaround altogether since the ICU issue has been addressed.

Resolves 167765567

(cherry picked from commit 8b45126)
@jmschonfeld
jmschonfeld marked this pull request as ready for review September 6, 2026 05:09
@jmschonfeld
jmschonfeld merged commit 97273c2 into main Sep 6, 2026
22 checks passed
@jmschonfeld
jmschonfeld deleted the automerge/merge-main-2026-09-05_09-07 branch September 6, 2026 05:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants