International characters almost always use values outside of the range of US-ASCII, which is only the english alphabet, numbers and a small set of symbols that you find on your keyboard (if you use a US keyboard). Characters with accents, fanciness, or that aren't even characters (eg. emoticons) are represented in more than one byte, which is all that is used to represent US-ASCII. The mappings of numerical value to character is callen an encoding. After US-ASCII, there's ISO-8891-1, which adds accents to the file (mostly Spanish, French, Swedish, etc.) (eg: é, å, ü, etc.). After that, you get Unicode, which includes things like ˝, ‰, Ó, ˆ, ◊, or almost any symbol you can think of in any language.

Ruby, by default, has the encoding of a program and all of the strings in it as US-ASCII. You can either change the encoding of the entire file (and everything in it) with the magic comment (see @KL-7's answer) or you can change it on a string by string basis:

"Olé".force_encoding("ISO-8891-1")

Ruby also supports an imaginary encoding called ASCI 8-bit, which is essentially binary data with no encoding.

I think force_encoding might help to work with the string later, but it won't help the interpreter to parse the original string literal. Am I right? Here is a related article on strings encoding in Ruby.
–
KL-7Jul 4 '12 at 14:46