#!/bin/sh

# Add -C utf8 if locale is UTF-8 and user didn't specify -d (might lack utf8.flc) or -C (different locale enforced)
if locale | grep -q UTF-8 && ! echo "$@" | grep -q -- '-d' && ! echo "$@" | grep -q -- '-C'; then
    exec /usr/bin/figlet-figlet -C utf8 "$@"
else
    exec /usr/bin/figlet-figlet "$@"
fi
