arp242 / uni

Query the Unicode database from the commandline, with good support for emojis
MIT License
806 stars 19 forks source link

identify: Uni is discarding Space, Tab and Newline characters #40

Closed esdnm closed 1 year ago

esdnm commented 1 year ago

$ printf "a b\tc\n" | hexyl 
┌────────┬─────────────────────────┬─────────────────────────┬────────┬────────┐
│00000000│ 61 20 62 09 63 0a       ┊                         │a b_c_  ┊        │
└────────┴─────────────────────────┴─────────────────────────┴────────┴────────┘

$ printf "a b\tc\n" | uni i
     CPoint  Dec    UTF8        HTML       Name (Cat)
'a'  U+0061  97     61          a     LATIN SMALL LETTER A (Lowercase_Letter)
'b'  U+0062  98     62          b     LATIN SMALL LETTER B (Lowercase_Letter)
'c'  U+0063  99     63          c     LATIN SMALL LETTER C (Lowercase_Letter)
arp242 commented 1 year ago

The idea originally was that you could do something like print 'i -json foo' | uni and that would work. Looks like this broke a long time ago when I redid the flag parsing, and it probably wasn't a good idea in a first place.

esdnm commented 1 year ago

I think, usage of InputOrArgs should be removed all together.