
Uni: Query the Unicode database from the CLI, with good support for emojis - oftenwrong
https://github.com/arp242/uni
======
JNRowe
I really appreciate the section on alternatives¹, and I wish more people would
add these to their projects. Not only does it show the author is aware of the
current landscape, it may even help users to find tools that better fit
_their_ needs. Imagine a tip of my virtual hat, @Carpetsmoker!

From the README's notes on emoj "not a fan of npm (has 1862 dependencies)",
I'm actually tempted to try that just to find out if it is true ;)

1\.
[https://github.com/arp242/uni/blob/master/README.markdown#al...](https://github.com/arp242/uni/blob/master/README.markdown#alternatives)

~~~
gioele
And yet, among the alternatives, there is no mention of `unicode`, a standard-
ish command line tool that does more or less the same thing and is available
in common Linux distros since ~2005.

Example output (the CLI's output is colored):

    
    
        $ unicode €
        U+20AC EURO SIGN
        UTF-8: e2 82 ac UTF-16BE: 20ac Decimal: &#8364; Octal: \020254
        €
        Category: Sc (Symbol, Currency)
        Bidi: ET (European Number Terminator)
    
        $ unicode 
        U+1F30D EARTH GLOBE EUROPE-AFRICA
        UTF-8: f0 9f 8c 8d UTF-16BE: d83cdf0d Decimal: &#127757; Octal: \0371415
        
        Category: So (Symbol, Other)
        Bidi: ON (Other Neutrals)
    
        U+1F3E4 EUROPEAN POST OFFICE
        UTF-8: f0 9f 8f a4 UTF-16BE: d83cdfe4 Decimal: &#127972; Octal: \0371744
        
        Category: So (Symbol, Other)
        Bidi: ON (Other Neutrals)
    

I am not being sarcastic here. I am just noticing that the software landscape
is vast, and that it is often hard to know what exists out there. Even old
glories are forgotten.

There should be an interdisciplinary stackoverflow where you can ask: "does
this already exist?"

~~~
Carpetsmoker
I can't find that one in Void or Arch, but did find it in Debian[1]. I _think_
this is the homepage[2] (Debian packages don't seem to have a clear field for
this?) I'll add it to the list.

I mainly searched for "emoji" tools, as that's the real reason I wanted this,
so I probably missed a zillion scripts. That list is by no means intended to
be comprehensive.

[1]:
[https://packages.debian.org/buster/unicode](https://packages.debian.org/buster/unicode)

[2]:
[http://kassiopeia.juls.savba.sk/~garabik/software/unicode/](http://kassiopeia.juls.savba.sk/~garabik/software/unicode/)

~~~
saghm
Looks like it might be this package in the AUR?
[https://aur.archlinux.org/packages/unicode/](https://aur.archlinux.org/packages/unicode/)

Given that it's been around for 10 years though, it probably won't be promoted
to the main repos

------
reanimus
I use [https://github.com/salty-horse/ibus-uniemoji](https://github.com/salty-
horse/ibus-uniemoji) to search emoji/unicode glyphs using the input. Works
pretty well for me.

------
perlancar3
There's also a Perl script with the same name since 2009, written by Audrey
Tang (of pugs fame) and then rewritten by Ricardo Signes (of Dist::Zilla
fame). I've used this script for years, not realizing there were other
implementations of it. Nice to know.

[https://metacpan.org/pod/uni](https://metacpan.org/pod/uni)

------
est
Or any text box on Mac hit ctrl+cmd+space, start typing unicode names

~~~
emmelaich
Thanks! But doesn't go the other way.

And doesn't have an easy way to see the long unicode name afaics.

~~~
coob
Mouseover on the emoji to see the unicode name.

------
the8472
I would love something like this for ibus

~~~
yorwba
If you're willing to switch to a different input method, fcitx supports
Unicode search: [https://fcitx-im.org/wiki/Unicode](https://fcitx-
im.org/wiki/Unicode)

I mostly use it for trivial stuff like proper Unicode arrows → instead of
ASCII ->, but I think it's pretty cool to have the option to type any Unicode
character I want.

~~~
pdfbadforunicod
I use it but it always seems kinda "buggy" to select the desired char

------
pdfbadforunicod
Or .. use vim Unicode

"Hover" to name.

Search is available, not live though

~~~
chrismorgan
What are you meaning by “hover”? All I know of is ga (a.k.a. the misnamed
:ascii), which tells you the decimal, hex and octal for the Unicode scalar
values, but doesn’t give you a name.

Oh, are you meaning
[https://github.com/chrisbra/unicode.vim](https://github.com/chrisbra/unicode.vim)?

~~~
Carpetsmoker
Uni started life as a replacement to that plugin (note how how the output is
similar) as I got tired of opening Vim all the time :-)

~~~
pdfbadforunicod
But it opens instantly! And zz to close

~~~
Carpetsmoker
Not as "instant" as dmenu, the searching is kinda awkward and not emoji-aware,
and you can't use it in pipes.

~~~
pdfbadforunicod
Ctrl-p like functionality wouldn't be too difficult... But I see your point

~~~
Carpetsmoker
Yeah, you can do a lot with it. One of the (unstated) ideas behind _uni_ is
that it can work as a backend for a lot of different integrations: dmenu, Vim,
fzf, Emacs, a more domain-specific emoji picker GUI, etc.

Other than this, the feature set is roughly similar. The biggest difference is
that uni knows how to deal with emoji sequences.

