Repository navigation
Avoid %c in error messages - #6795
Merged
Merged
Conversation
smcv
force-pushed
the
validation-errors
branch
from
August 21, 2026 14:21
1c1df8b to
45d78f2
Compare
Until now we have been using `%c` to show invalid characters, but in general that will corrupt our output if the input is non-ASCII, because the individual bytes of a UTF-8 string are not valid UTF-8 alone. Signed-off-by: Simon McVittie <[email protected]>
Signed-off-by: Simon McVittie <[email protected]>
Signed-off-by: Simon McVittie <[email protected]>
While I'm changing the translatable string anyway, this also incorporates a suggestion from flatpak#6753 to quote the invalid character, so that output is clearer in the case where the invalid character is whitespace. Thanks: Christian Stadelmann Signed-off-by: Simon McVittie <[email protected]>
Now that our error messages are valid UTF-8, we should no longer need to do this. This reverts commit 242e989. Signed-off-by: Simon McVittie <[email protected]>
smcv
force-pushed
the
validation-errors
branch
from
August 21, 2026 16:00
45d78f2 to
4edc45c
Compare
swick
approved these changes
Aug 21, 2026
Merged
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.
utils: Add a function to describe invalid characters in strings
Until now we have been using
%cto show invalid characters, but ingeneral that will corrupt our output if the input is non-ASCII,
because the individual bytes of a UTF-8 string are not valid UTF-8 alone.
utils: Avoid corrupting our output if an invalid glob is not UTF-8
po: Update translations for "Invalid glob character" where obvious
ref-utils: Always produce valid UTF-8 in validation error messages
While I'm changing the translatable string anyway, this also
incorporates a suggestion from ref-utils: Improve error message intelligibility #6753 to quote the invalid character, so
that output is clearer in the case where the invalid character is
whitespace.
Thanks: Christian Stadelmann
Revert "tests: Avoid Meson's strict TAP parsing for now"
Now that our error messages are valid UTF-8, we should no longer need to
do this.
This reverts commit 242e989.