SCR_public/23SCR/encodage

11 lines
262 B
Plaintext
Raw Normal View History

2024-12-09 11:58:49 +01:00
#!/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"