From: "Y. NOBUOKA" Date: 2011-01-17T01:53:44+09:00 Subject: Re: [Ruby 1.9] New String rules? Hi, In Ruby 1.9, every String object knows the encoding of itself. So you need to designate the source code encoding by a magic comment. The style of a magic comment is: # coding: [source_code_encoding] You can write other element in a magic comment: # -*- coding: utf-8 -*- If you write the magic comment, you must write it on the first line (or the second line if the first line is a shebang) of your source code. example (the number of left side is a line number) 1: #!/usr/bin/ruby 2: # coding: utf-8 3: str = "The non-ascii string: Zdefiniować nowy" -- nobuoka