'Bash equivalent to python "unicodedata.name"?

is there an equivalent to python "unicodedata.name" in bash, maybe a linux file with letter names? Is it possible to convert an "L" to "LATIN CAPITAL LETTER L" with iconv?

Thanks for help

import unicodedata; print (unicodedata.name("L"))

If an equivalent in iconv exists I don't know which is the right one. Wanted instead of "L" as issue "LATIN CAPITAL LETTER L".

echo -e "L" | iconv -f UTF-8 -t UNICODELITTLE//TRANSLIT


Solution 1:[1]

Using a perl one-liner:

$ perl -CA -Mcharnames=\(\) -E 'say charnames::viacode(ord $ARGV[0])' L
LATIN CAPITAL LETTER L

Or with python:

$ python3 -c 'import sys, unicodedata; print(unicodedata.name(sys.argv[1][0]))' L
LATIN CAPITAL LETTER L

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Shawn