Support for iterating Unicode grapheme clusters #123
Labels
No labels
Arch
AMD64
Arch
m68k
Arch/PowerPC64
Bug
Documentation
Duplicate
Feature
Infeasible
Invalid
Nice to Have
ObjC++
ofarc
ofhttp
OS
AmigaOS
OS
FreeBSD
OS
Linux
OS
macOS
OS
Windows
Out of Scope
Question
Runtime
Security
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Depends on
#3 Finish Unicode NF(K)D support
ObjFW/ObjFW
#4 Support Unicode NF(K)C
ObjFW/ObjFW
Reference
ObjFW/ObjFW#123
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Since you said the internal representation of strings in ObjFW is UTF-8 (ObjFW/discussions#14 (comment)).
We will have proper
reversemethod for string (fix #115).There are other options you could choose if you don't like utf8proc, e.g, libunistring.
I think you can implement it the same way you implement TLS support in ObjFW: being able to use multiple backends.
ObjFW will not add any dependencies with TLS being the only exception - and that is planned to be temporary, too. ObjFW already has its own Unicode support that just needs to be extended, which is blocked on things such as #3 and #4.
That being said, there is nothing stopping someone from writing a library that uses utf8proc, libunistring or icu to add additional methods to OFString via a category. So you can just add it yourself!
Make OFString grapheme cluster aware with utf8procto Add support for iterating Unicode grapheme clustersAdd support for iterating Unicode grapheme clustersto Support for iterating Unicode grapheme clustersI already have something like this, even though only the
reversemethod implemented. All thank to the LLMs.But I would love to see new progress from your native implementation. Unicode is hard, so it's understandable that the very first issues like #3 and #4 are preserved for Unicode and are still not addressed.
The number of the issues is random, as they were migrated from Fossil in random order 😉.
#3 is mostly done already in https://git.nil.im/ObjFW/ObjFW/src/branch/unicode-normalization.