uni

command module
v0.0.0-...-2f7162a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 13, 2023 License: MIT Imports: 12 Imported by: 0

README ยถ

uni - find and display Unicode characters

Usage

Usage:
  uni [-n] <search>    search for codepoints with names matching <search>
  uni [-n] /regex/     search for codepoints with names matching regular expression /regex/
  uni [-p] U+<xxxx>    display codepoint U+<xxxx>
  uni [-c] <string>    display each codepoint in <string>
  uni -x <hex>         decode UTF-8 string from <hex> and display codepoints if valid

Other flags:
  -8                   display UTF-8 sequences alongside codepoints
  -16                  display UTF-16 sequences alongside codepoints

Examples

Search for codepoints containing a word in their name:

% uni dog
โบจ	U+2EA8 	CJK RADICAL DOG
โฝ	U+2F5D 	KANGXI RADICAL DOG
๐ŸŒญ	U+1F32D	HOT DOG
๐Ÿ•	U+1F415	DOG
๐Ÿถ	U+1F436	DOG FACE
๐Ÿฆฎ	U+1F9AE	GUIDE DOG

Search for codepoints whose name matches a regular expression:

% uni /^snow/
โ˜ƒ	U+2603 	SNOWMAN
โ›„	U+26C4 	SNOWMAN WITHOUT SNOW
โ„	U+2744 	SNOWFLAKE
๐Ÿ‚	U+1F3C2	SNOWBOARDER
๐Ÿ”	U+1F3D4	SNOW CAPPED MOUNTAIN

Display a specific codepoint:

% uni U+1f98a
๐ŸฆŠ	U+1F98A	FOX FACE

Decode a hexadecimal string as a sequence of codepoints:

% uni -x 6b69cc81207475cc9bcca3
k	U+006B  (6B)      	LATIN SMALL LETTER K
i	U+0069  (69)      	LATIN SMALL LETTER I
โ—Œฬ	U+0301  (CC 81)   	COMBINING ACUTE ACCENT
	U+0020  (20)      	SPACE
t	U+0074  (74)      	LATIN SMALL LETTER T
u	U+0075  (75)      	LATIN SMALL LETTER U
โ—Œฬ›	U+031B  (CC 9B)   	COMBINING HORN
โ—Œฬฃ	U+0323  (CC A3)   	COMBINING DOT BELOW

(Vietnamese for "characters".)

Display the codepoints which make up a string:

% uni -c ๐Ÿณ๏ธโ€๐ŸŒˆ
๐Ÿณ	U+1F3F3	WAVING WHITE FLAG
	U+FE0F 	VARIATION SELECTOR-16
	U+200D 	ZERO WIDTH JOINER
๐ŸŒˆ	U+1F308	RAINBOW

Display a character map:

% uni -m 2580-25ff
        0   1   2   3   4   5   6   7   8   9   A   B   C   D   E   F
      โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
 2580 โ”‚ โ–€   โ–   โ–‚   โ–ƒ   โ–„   โ–…   โ–†   โ–‡   โ–ˆ   โ–‰   โ–Š   โ–‹   โ–Œ   โ–   โ–Ž   โ–
 2590 โ”‚ โ–   โ–‘   โ–’   โ–“   โ–”   โ–•   โ––   โ–—   โ–˜   โ–™   โ–š   โ–›   โ–œ   โ–   โ–ž   โ–Ÿ
 25a0 โ”‚ โ–    โ–ก   โ–ข   โ–ฃ   โ–ค   โ–ฅ   โ–ฆ   โ–ง   โ–จ   โ–ฉ   โ–ช   โ–ซ   โ–ฌ   โ–ญ   โ–ฎ   โ–ฏ
 25b0 โ”‚ โ–ฐ   โ–ฑ   โ–ฒ   โ–ณ   โ–ด   โ–ต   โ–ถ   โ–ท   โ–ธ   โ–น   โ–บ   โ–ป   โ–ผ   โ–ฝ   โ–พ   โ–ฟ
 25c0 โ”‚ โ—€   โ—   โ—‚   โ—ƒ   โ—„   โ—…   โ—†   โ—‡   โ—ˆ   โ—‰   โ—Š   โ—‹   โ—Œ   โ—   โ—Ž   โ—
 25d0 โ”‚ โ—   โ—‘   โ—’   โ—“   โ—”   โ—•   โ—–   โ——   โ—˜   โ—™   โ—š   โ—›   โ—œ   โ—   โ—ž   โ—Ÿ
 25e0 โ”‚ โ—    โ—ก   โ—ข   โ—ฃ   โ—ค   โ—ฅ   โ—ฆ   โ—ง   โ—จ   โ—ฉ   โ—ช   โ—ซ   โ—ฌ   โ—ญ   โ—ฎ   โ—ฏ
 25f0 โ”‚ โ—ฐ   โ—ฑ   โ—ฒ   โ—ณ   โ—ด   โ—ต   โ—ถ   โ—ท   โ—ธ   โ—น   โ—บ   โ—ป   โ—ผ   โ—ฝ  โ—พ  โ—ฟ

Acknowledgements

uni draws heavy inspiration from the Perl utility App::Uni.

Documentation ยถ

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL