method

toutf8

v1_8_7_72 - Show latest stable - Class: String
toutf8()
public

Convert self to UTF-8

Note This method decode MIME encoded string and convert halfwidth katakana to fullwidth katakana. If you don’t want it, use NKF.nkf(’-wxm0’, str).

1Note

you need kconv

azhao · Apr 2, 2013

require 'kconv'

then

“中国人民很行”.toutf8