Repository navigation
Update is_printable to Unicode 17.0 - #4962
Merged
Merged
Conversation
Signed-off-by: FenjuFu <fufenjupku@gmail.com>
vitaut
approved these changes
Oct 4, 2026
Contributor
|
Thank you! |
james-panayis
pushed a commit
to james-panayis/fmt
that referenced
this pull request
Oct 4, 2026
The U+1FAE0 and U+31350 cases added in fmtlib#4962 duplicate the is_printable checks for the same code points. For a code point >= 0x80 needs_escape is exactly !is_printable(cp), and the existing U+1F984 case already covers a printable 4-byte sequence passing through unmodified.
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.
Regenerate
is_printablewithsupport/printable.pyagainst the current UnicodeData.txt (17.0.0). The table was last generated from Unicode 13.0, so code points assigned since then (e.g. 🫠 U+1FAE0 and CJK Extensions H/I/J) were escaped as unassigned.The generated code is formatted with clang-format 21, and the script itself is unchanged.
The existing test used U+2A6DE as an unassigned code point, but it has been assigned since Unicode 14.0, so it is replaced with U+2A6E0, which is still unassigned. The PR also adds checks for code points from 14.0, 15.0 and 17.0.
Fixes #4961.