#!/bin/bash if [ $# -ne 1 ]; then echo "Usage: $0 " 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"