Last active
October 31, 2023 13:20
-
-
Save szepeviktor/2cc8c80653188be049c9a93df1611eb0 to your computer and use it in GitHub Desktop.
Sort characters by their UNICODE codepoint
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 | |
# File with a string of UTF-8 characters | |
FILE="$1" | |
paste <(cat "${FILE}" | iconv -f UTF-8 -t UNICODE | hexdump -s 2 -e '1/2 "U+%04X\n"') <(grep -o '.' "${FILE}") \ | |
| sort |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
With
ÁÉÍÓÖŐÚÜŰáéíóöőúüű
being in the file the output ishttps://www.compart.com/en/unicode/U+00C1