Use 'wc' to compute message length in order to support UTF8

Signed-off-by: KheOps <kheops@ceops.eu>