# encoding: utf-8 require 'nkf' require 'conv_ja_char/version' module ConvJaChar class Normalization def self.kana(str) return '' unless str # -Z1 : convert from X0208 white sapce to ASCII white space # -X : convert from X0201 half-size katanaka to X0208 full-size katakana # -w : output UTF-8 without BOM # --katakana : convert from hiragana to katakana NKF.nkf('-Z1 -X -w --katakana', "#{str}").downcase end end end