kconv(str, to_enc, from_enc=nil)
private
Convert str to to_enc. to_enc and from_enc are given as constants of Kconv or Encoding
objects.
Show source
def kconv(str, to_enc, from_enc=nil)
opt = ''
opt += ' --ic=' + from_enc.to_s if from_enc
opt += ' --oc=' + to_enc.to_s if to_enc
::NKF::nkf(opt, str)
end