11 lines
262 B
Plaintext
11 lines
262 B
Plaintext
|
#!/bin/bash
|
||
|
|
||
|
if [ $# -ne 1 ]; then
|
||
|
echo "Usage: $0 <caractère>"
|
||
|
exit 1
|
||
|
fi
|
||
|
|
||
|
caractere="$1"
|
||
|
encodage_utf8=$(printf "%s" "$caractere" | iconv -t UTF-8 | hexdump -C | awk '{print $2}' | tr -d '\n')
|
||
|
|
||
|
echo "L'encodage UTF-8 de '$caractere' est : 0x$encodage_utf8"
|