Merge release/6.4.x into main - #2226
Merged
Merged
Conversation
(cherry picked from commit 15939ee)
(cherry picked from commit 3156b08)
* Correct BOM detection for files with unknown encoding * Use MemoryLayout rather than a hardcoded value (cherry picked from commit 04125bb)
(cherry picked from commit 43dbc1f)
(cherry picked from commit 67f9c74)
(cherry picked from commit c78ad43)
(cherry picked from commit 64ead46)
`_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)
(cherry picked from commit df77f8a)
Cherry pick back 6.4.x
jmschonfeld
marked this pull request as ready for review
September 6, 2026 05:09
jmschonfeld
approved these changes
Sep 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.