Skip to content
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

Give print an option to not sort characters (or make it not sort by default?) #47

Open
jwodder opened this issue Nov 24, 2023 · 2 comments

Comments

@jwodder
Copy link

jwodder commented Nov 24, 2023

$ uni print 43 42 41 43
     CPoint  Dec    UTF8        HTML       Name (Cat)
'A'  U+0041  65     41          A     LATIN CAPITAL LETT… (Uppercase_Let…)
'B'  U+0042  66     42          B     LATIN CAPITAL LETT… (Uppercase_Let…)
'C'  U+0043  67     43          C     LATIN CAPITAL LETT… (Uppercase_Let…)
'C'  U+0043  67     43          C     LATIN CAPITAL LETT… (Uppercase_Let…)

As you can see, the output from print sorts characters by codepoints rather than outputting them in the order given on the command line. This is a problem for scripted use, and it's inconsistent with how uni identify works. It also seems strange that the codepoints are sorted but duplicates are not removed.

@arp242
Copy link
Owner

arp242 commented Nov 24, 2023

I think sorting it like this by default makes sense, because unlike identify you usually don't really care about the order on the CLI, but rather about printing the ranges, blocks, categories, in any order. Or at least, that's how I use it.

That said, it would be nice to have an option.

@arp242
Copy link
Owner

arp242 commented Nov 24, 2023

Just to set expectations: I probably won't work on this any time soon, but I'll merge patches.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants