-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
<format>: Add grapheme clusterization support for width computation #2119
Merged
Conversation
This file contains 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
StephanTLavavej
added
enhancement
Something can be improved
format
C++20/23 format
labels
Aug 13, 2021
CaseyCarter
reviewed
Aug 20, 2021
AdamBucior
reviewed
Aug 20, 2021
tests/std/tests/P0645R10_text_formatting_grapheme_clusterization/test.cpp
Outdated
Show resolved
Hide resolved
StephanTLavavej
requested changes
Aug 21, 2021
This comment was marked as resolved.
This comment was marked as resolved.
cpplearner
reviewed
Apr 2, 2022
This comment was marked as resolved.
This comment was marked as resolved.
tests/std/tests/P0645R10_text_formatting_grapheme_clusterization/env.lst
Outdated
Show resolved
Hide resolved
tests/std/tests/P0645R10_text_formatting_grapheme_clusterization/test.cpp
Outdated
Show resolved
Hide resolved
tests/std/tests/P0645R10_text_formatting_grapheme_clusterization/test.cpp
Outdated
Show resolved
Hide resolved
tests/std/tests/P0645R10_text_formatting_grapheme_clusterization/test.cpp
Outdated
Show resolved
Hide resolved
tests/std/tests/P0645R10_text_formatting_grapheme_clusterization/test.cpp
Outdated
Show resolved
Hide resolved
|
StephanTLavavej
approved these changes
Apr 23, 2022
strega-nil-ms
approved these changes
Apr 23, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks reasonable, just some small nits (and a terrified comment)
barcharcraz
commented
Apr 23, 2022
StephanTLavavej
approved these changes
Apr 23, 2022
I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed. |
StephanTLavavej
dismissed
CaseyCarter’s stale review
April 27, 2022 01:46
Casey approved internal mirror MSVC-PR-395673, feedback addressed
😻 🎉 🚀 |
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.
_Measure_string_prefix
to count only the first character of each unicode extended grapheme cluster (untailored) as defined in UAX29 and using the Unicode 13 data files (included intools/unicode_properties_parse
). This new processing is only turned on for the "statically UTF-8" case, and not when the system codepage is set to UTF-8, this could be improved in the future, although arguably leads to more consistent behavior._Fmt_codec
is adapted to use the new unicode parsing functions, this makes it more robust against malformed (in particular truncated) UTF-8._Parse_align
still gets only the number of code units in the alignment character, so it will copy an entire malformed subsequence to the format specs, not a U+FFFD replacement (this is not tested)._Decode_utf
function forchar32_t
inputs, this is to facilitate testing, but could be removed without too much trouble (after modifying the test generator to encode its output).Future improvements:
closes: #1945