How can I set the encoding of a file when using a File#open?
File#open
That blog also has a bunch of great information about character encoding with Ruby, including a post about encoding with Ruby 1.8.