$ ./print-unicode-codepoint.bash
U+0061
U+3042
Created
November 16, 2021 01:52
-
-
Save miy4/625b6b644be719e2f32d5b504ec15ec8 to your computer and use it in GitHub Desktop.
Print Unicode codepoint in Bash
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# http://mywiki.wooledge.org/BashFAQ/071 | |
# > If the leading character is a single-quote or double-quote, | |
# > the value shall be the numeric value in the underlying codeset | |
# > of the character following the single-quote or double-quote. | |
printf 'U+%04x\n' "'a" | |
printf 'U+%04x\n' "'あ" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment