-
-
Notifications
You must be signed in to change notification settings - Fork 14.3k
Closed
Description
It would be nice to have a wcwidth-alike, presumably living in core::unicode and exposed as a char method. I've got a working local implementation of this that automatically generates the search tables for 0- and double-width characters from the latest unicode data (this does not need to be done at build time, only when the unicode charsets are updated).
If this is a desirable feature, can you give me some guidance as to
- What the function should be called (
wcwidthis pretty C-ish and maybe not so Rustic). - Where the autogen stuff should live (maybe in
src/etc/unicode_width?) - Whether you'd like me to add a
wcwidth_cjk-equivalent function, whose behavior is slightly different on certain spacing characters, as described in http://www.cl.cam.ac.uk/~mgk25/ucs/wcwidth.c (see comment above themk_wcwidth_cjkfunction).
Any other thoughts are, of course, appreciated.
Metadata
Metadata
Assignees
Labels
No labels