Add Unicode Blocks access and iteration #4803
Labels
C-unicode
Component: Props, sets, tries
good first issue
Good for newcomers
S-medium
Size: Less than a week (larger bug fix or enhancement)
We should consider adding Unicode Blocks to the
icu_properties
crate. It should probably include:Concretely I think the most practical way to implement this would be to make an open enum for the block and then basically treat the block like an enumerated property, including code point access and display name parsing. I think it should pack pretty small in an InversionMap since the code point space is already segmented into fairly large contiguous blocks.
I imagine that the most difficult part of the implementation would be the sourcing of the data in datagen.
This would be a good first issue of medium scope.
Discussed in #4798
Originally posted by faassen April 11, 2024
I dug around the source code, but I couldn't find a representation in Rust code of the
Blocks.txt
data. There's theunicode_blocks
crate, but this misses an important feature; I need to be able to iterate through all blocks. I need to be able to look them up by name, but not the name as given as this has space characters. So iteration seems required so I can do some pre-processing. This is to implement regular expressions as defined by appendix F in the XML Schema specification:Being able to get a
CodePointInvList
for a block would also be nice.https://www.w3.org/TR/xmlschema-2/#regexs
Did I miss something? Is this planned?
The text was updated successfully, but these errors were encountered: