use Encode qw(from_to); from_to($word, 'utf8', 'euc-jp');