Merged
Conversation
98d25ad to
9715f06
Compare
Collaborator
Author
|
Force pushed to add License headers and reformat (diff) |
48554a2 to
820134e
Compare
f104f7d to
320aae1
Compare
|
GNU testsuite comparison: |
Collaborator
Author
|
Referencing issues that could be fixed thanks to this patch: |
6513a29 to
5dbd1ef
Compare
|
GNU testsuite comparison: |
5dbd1ef to
9ad4f01
Compare
sylvestre
reviewed
Jun 24, 2025
|
GNU testsuite comparison: |
9ad4f01 to
5237962
Compare
|
GNU testsuite comparison: |
1921183 to
3fe7f94
Compare
|
GNU testsuite comparison: |
cakebaker
reviewed
Jun 25, 2025
Contributor
There was a problem hiding this comment.
@RenjiSann is it intentional that this file is in test and not somewhere in tests?
Collaborator
Author
There was a problem hiding this comment.
Oops, that's a remainder of me testing stuff :/
I will open a merge request to revert it
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 brings initial support for Locale-aware quoting.
Basically, the code fetches the locale data (for now it looks at
LC_ALLandLC_COLLATE, might have to fix it in the future).It will parse the second part of the locale if existing to deduce the encoding:
C.UTF-8,fr_FR.UTF-8are UTF-8 encoded, whileen_USandCdefault to simple ASCII (should be ISO-8859-1, but there is no support for it right now).Disclaimer: Right now, only UTF-8 and ASCII encodings are supported. Further support will be discussed as it may be less trivial to implement.
In order to do this, I've heavily refactored the
quoting_stylecode:Quotertrait to factorize the interface of all quoting mechanismspush_char()orpush_invalid()depending on the encoding.