#!/bin/sh

PATH=$PATH:/usr/X11R6/bin:/usr/local/bin

for i in leafpad gedit gvim madedit kedit kate
do
  which $i > /dev/null
  if [ $? = 0 ]; then
    UTF8ED=$i
    break
  fi
done

export LC_CTYPE=zh_TW.UTF-8
export LC_ALL=zh_TW.UTF-8

$UTF8ED $1
