Converting From One Encoding to Another : Unicode « Development « Ruby





Converting From One Encoding to Another


require 'iconv'
input_encoding = "windows-1252"
output_encoding = 'utf-8'

converted_doc = Iconv.new(output_encoding, input_encoding).iconv("asdf")

 

Related examples in the same category