How can I set the encoding of a file when using a File#open?
File#open
Here's the way to read pages with Japanese Shift JIS encoding:
file = open(url, "r:Shift_JIS")