# File lib_ctrl/rucy/jconv.rb, line 8 def jconv(data) return '' if data.empty? begin Uconv.u8tou16(data) # test UTF-8 return data rescue Uconv::Error # auto-conversion of Japanese encoding return Uconv.euctou8(NKF.nkf('-e', data)) end end