UTF-8からShift_JISに変換する時の注意 - Qiita

UTF-8 から SJIS変換する時、str.encode(Encoding::SJIS, :invalid => :replace, :undef => :replace)と、やれば Enco…