当前位置:网站首页>How to display √ 2 on the command line terminal ̅? This is actually a blog's Unicode test article
How to display √ 2 on the command line terminal ̅? This is actually a blog's Unicode test article
2022-07-04 09:28:00 【Hu Zhenghui】
How does the command line terminal display √2̅? This is actually a blog Unicode The test article
List of articles
install uni command
Because there are significant differences in the implementation of different operating systems , The following is in MacOS X Medium test .
This article USES the uni command , Inquire about uni Basic information of the command .
brew info uni
The query result is
Unicode database query tool for the command-line
https://github.com/arp242/uni
uni The command is to query in the command line Unicode Database tools .
Use the following command to install .
brew install uni
uni Basic usage of command
Check help after installation
uni help
The help content is
Usage: uni [-hrq] [help | identify | search | print | emoji]
Flags:
-q Quiet output; don't print header, "no matches", etc.
-r "Raw" output instead of displaying graphical variants for control
characters and ◌ (U+25CC) before combining characters.
Commands:
identify [string string ...]
Idenfity all the characters in the given strings.
search [word word ...]
Search description for any of the words.
print [ident ident ...]
Print characters by codepoint, category, or block:
Codepoints U+2042, U+2042..U+2050, 0x20, 0o40, 0b100000
Categories and Blocks OtherPunctuation, Po, GeneralPunctuation
all Everything
Names are matched case insensitive; spaces and commas are optional and
can be replaced with an underscore. "Po", "po", "punction, OTHER",
"Punctuation_other", and PunctuationOther are all identical.
emoji [-tone tone,..] [-gender gender,..] [-groups word] [word word ...]
Search emojis. The special keyword "all" prints all emojis.
-group comma-separated list of group and/or subgroup names.
-tone comma-separated list of light, mediumlight, medium,
mediumdark, dark. Default is to include none.
-gender comma-separated list of person, man, or woman.
Default is to include all.
Note: output may contain unprintable character (U+200D and U+FE0F) which
may not survive a select and copy operation from text-based applications
such as terminals. It's recommended to copy to the clipboard directly
with e.g. xclip.
The simplest usage is
uni identify abc
The output is
cpoint dec utf-8 html name
'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)
It can be seen directly uni identify The command displays the corresponding Unicode Character information . Each of them is
- First column . Query characters , In this case
'a'、'b'and'c' - Second column .
cpoint,UnicodeThe number of , In this caseU+0061、U+0062andU+0063 - The third column .
dec, Decimal value , In this case97、98and99 - The fourth column .
utf-8,utf-8The hexadecimal of , In this case61、62and63 - The fifth column .
html,htmlEntity representation of , In this casea、bandc - The sixth column .
name, Name and grouping of characters . The groups in this example areLowercase_Letter, The name of the character isLATIN SMALL LETTER A、LATIN SMALL LETTER BandLATIN SMALL LETTER C
Use the following command to search name The name of the character in the column
uni search square root
The output is
cpoint dec utf-8 html name
'√' U+221A 8730 e2 88 9a √ SQUARE ROOT (Math_Symbol)
Compared with the previous results, we can see ,utf-8 It doesn't mean cpoint 了 , and html by √, Not Numbers .
Each character corresponds to a unique cpoint Number , Therefore, you can also use the following command to directly query the number .
uni print U+221A
perhaps
uni print 0x221A
The output results are the same as before .
print Subcommands can also be used to query by category .
uni print OtherPunctuation | wc -l
The output is 594, explain OtherPunctuation Contained in the 594 Characters . Abbreviations can also be used to query by category .
uni print Po | wc -l
perhaps
uni print po | wc -l
The output results are also 594.
If you want to export all Unicode Character information , You can print all categories .
uni print all | wc -l
At present for 33798 Characters .
emoji expression
uni The command also supports query emoji expression , For example, query the expression of the middle finger with different skin colors .
uni emoji -tone light,mediumlight,medium,mediumdark,dark middle
among emoji Subcommands represent query expressions ,-tone Indicates query skin color ,light、mediumlight、medium、mediumdark and dark There are five skin colors , You can choose one or more , This example lists all five ,middle Is the expression name of the search , In this case middle Search for middle finger. The output is
middle finger: light skin tone People & Body hand-single-finger
middle finger: mediumlight skin tone People & Body hand-single-finger
middle finger: medium skin tone People & Body hand-single-finger
middle finger: mediumdark skin tone People & Body hand-single-finger
middle finger: dark skin tone People & Body hand-single-finger
You can also print the expression of the specified classification , For example, print the expression with glasses
uni emoji -group face-glasses
In command -group Parameter indicates the specified face-glasses classification , The output is
smiling face with sunglasses Smileys & Emotion face-glasses
nerd face Smileys & Emotion face-glasses
🧐 face with monocle Smileys & Emotion face-glasses
We can see from the example of the middle finger , Expressions with the same name may correspond to multiple expressions with different skin colors , Except for skin color , Expressions with the same name may also correspond to expressions of different genders . For example, query Brown expression
uni emoji -gender man,woman blond
among -gender Used to specify the gender of the query , You can specify man and woman,blone Is the expression name of the search . The output is
*️ man: blond hair People & Body person
*️ woman: blond hair People & Body person
Non spacing mark
Although the expression looks different from the traditional characters , But it still occupies a certain width , stay Unicode There is also a class of non spacing marks , No width , It can be superimposed on the previous characters , The category name of the non spacing mark is Nonspacing_Mark, You can query non spacing marks as follows
uni print Nonspacing_Mark | wc -l
The results show that there are 1840 Non spacing marks . In this example, you want to print √2̅, The root sign is the one queried above U+221A, Next, query the overline in non spacing marks .
uni print Nonspacing_Mark | ack -i OVERLINE | pbcopy
The result is
'◌̅' U+0305 773 cc 85 ̅ COMBINING OVERLINE (Nonspacing_Mark)
'◌̿' U+033F 831 cc bf ̿ COMBINING DOUBLE OVERLINE (Nonspacing_Mark)
'�' U+0B55 2901 e0 ad 95 ୕ ORIYA SIGN OVERLINE (Nonspacing_Mark)
among U+0305 Underline ,U+033F Underline double ,U+0B55 yes Oriya The overline of language . In this case, use U+0305, Combined with the above query results , In this example, the output command is
echo -e \\u221a2\\u0305 | pbcopy
among -e Indicates support for extension tags ,\\u221a Indicative output Unicode character U+221A,\\u0305 Indicative output Unicode character U+0305. The result is
√2̅
stay Microsoft Word in , have access to Alt+X Shortcut key conversion Unicode , For example, the input
221a20305
Choose 221a Then press Alt+X You can convert the root , Choose 0305 Then press Alt+X You can convert non spacing character dashes .
边栏推荐
- Are there any principal guaranteed financial products in 2022?
- Daughter love: frequency spectrum analysis of a piece of music
- Fatal error in golang: concurrent map writes
- Langage C - démarrer - base - syntaxe - [opérateur, conversion de type] (vi)
- Awk from getting started to digging in (9) circular statement
- Reload CUDA and cudnn (for tensorflow and pytorch) [personal sorting summary]
- "How to connect the Internet" reading notes - FTTH
- Reading notes of how the network is connected - understanding the basic concepts of the network (I)
- 如何编写单元测试用例
- Report on investment analysis and prospect trend prediction of China's MOCVD industry Ⓤ 2022 ~ 2028
猜你喜欢

Solve the problem of "Chinese garbled MySQL fields"

Jianzhi offer 09 realizes queue with two stacks

Relationship and operation of random events

Sword finger offer 30 contains the stack of Min function
](/img/89/0f5f4ba07c637b09abe873016cba2d.png)
C语言-入门-基础-语法-[标识符,关键字,分号,空格,注释,输入和输出](三)
![[untitled] forwarding least square method](/img/8b/4039715e42cb4dc3e1006e8094184a.png)
[untitled] forwarding least square method

Daughter love in lunch box

Leetcode (Sword finger offer) - 35 Replication of complex linked list

2022-2028 global optical transparency industry research and trend analysis report
![C language - Introduction - Foundation - syntax - [main function, header file] (II)](/img/5a/c6a3c5cd8038d17c5b0ead2ad52764.png)
C language - Introduction - Foundation - syntax - [main function, header file] (II)
随机推荐
2022-2028 global gasket plate heat exchanger industry research and trend analysis report
Awk from entry to earth (12) awk can also write scripts to replace the shell
C language - Introduction - Foundation - syntax - [main function, header file] (II)
2022-2028 global protein confectionery industry research and trend analysis report
C语言-入门-基础-语法-[标识符,关键字,分号,空格,注释,输入和输出](三)
ArrayBuffer
Explanation of closures in golang
After unplugging the network cable, does the original TCP connection still exist?
Flutter tips: various fancy nesting of listview and pageview
C language - Introduction - Foundation - syntax - [variable, constant light, scope] (V)
2022-2028 global gasket metal plate heat exchanger industry research and trend analysis report
Luogu deep foundation part 1 Introduction to language Chapter 4 loop structure programming (2022.02.14)
Global and Chinese PCB function test scale analysis and development prospect planning report Ⓑ 2022 ~ 2027
In depth research and investment strategy report on China's hydraulic parts industry (2022 Edition)
Horizon sunrise X3 PI (I) first boot details
Daughter love in lunch box
"How to connect the Internet" reading notes - FTTH
Live in a dream, only do things you don't say
2022-2028 research and trend analysis report on the global edible essence industry
【LeetCode 42】501. Mode in binary search tree