date:UTF-8 checks exist to keep custom date formats binary-safe#9972
Open
mattsu2020 wants to merge 2 commits intouutils:mainfrom
Open
date:UTF-8 checks exist to keep custom date formats binary-safe#9972mattsu2020 wants to merge 2 commits intouutils:mainfrom
mattsu2020 wants to merge 2 commits intouutils:mainfrom
Conversation
|
GNU testsuite comparison: |
Contributor
|
i think something went wrong with the stack of commits |
|
GNU testsuite comparison: |
Merging this PR will not alter performance
Comparing Footnotes
|
|
GNU testsuite comparison: |
sylvestre
reviewed
Jan 17, 2026
sylvestre
reviewed
Jan 17, 2026
sylvestre
reviewed
Jan 17, 2026
sylvestre
reviewed
Jan 17, 2026
sylvestre
reviewed
Jan 17, 2026
sylvestre
reviewed
Jan 17, 2026
| Some(out) | ||
| } | ||
|
|
||
| fn write_formatted_output( |
Contributor
Author
There was a problem hiding this comment.
|
GNU testsuite comparison: |
1 similar comment
|
GNU testsuite comparison: |
|
GNU testsuite comparison: |
This commit removes the strict UTF-8 validation that was previously enforced on Unix systems when using custom format strings with the date command. Previously, if a format string contained invalid UTF-8 bytes and the locale was set to UTF-8, the command would fail with an error. Now, the command will always attempt to decode format strings in a byte-preserving manner, allowing non-UTF-8 format strings to work regardless of the locale setting. The change simplifies the behavior by removing the conditional UTF-8 validation logic and associated error handling, making the date command more permissive with format strings containing invalid UTF-8 sequences.
56987dd to
7e7edb1
Compare
|
GNU testsuite comparison: |
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.
new OutputEncoding enum, byte-preserving helpers, and UTF-8 checks exist to keep custom date formats binary-safe.
related
#9959