#!/bin/sh
options=
input=-
while test $# != 0; do
  case $1 in
    -I) options="$options $1 $2"; shift; shift;;
    -*) options="$options $1"; shift;;
    *) input=$1; shift;;
  esac
done
if test "X$input" = X-; then
  u8_utf8_prep | soelim $options
else
  u8_utf8_prep < "$input" | soelim $options
fi
# Or maybe u8_utf8_prep should be applied after soelim?
#   soelim "$@" | u8_utf8_prep
