Alex Rivera | Logout

How to specify output file encoding in Ruby?

Asked 2009-09-04T09:35:23.680
34

How can I set the encoding of a file when using a File#open?

Edit
Report

1 Answer

1

Here's the way to read pages with Japanese Shift JIS encoding:

  file = open(url, "r:Shift_JIS")
answered 2012-11-20T13:38:10.797

Your Answer