I am rendering onto a web page a file that has a iso-8559-1 character
set, Rails sends out data as UTF-8, so i am getting character mapping
I thought the most straightforward solution would be to convert the
input file text into UTF-8 first, then pass it over to rails to fire
out as UTF-8.
I thought I could do (summary code):
trans = Iconv.new(‘UTF-8’, ‘ISO-8559-1’)
input_text = File.read(‘filename’)
output_text = trans.iconv(input_text)
But I get an unsupported encoding error on my Mac and Windows.
How do y’all convert this iso-8559-1 charset?