From: Jason Mcdonald Date: 2011-01-14T02:01:06+09:00 Subject: Re: Weird error using String#[] Thanks, Robert. The original post has the script with both expected and unexpected outcomes. What you show with the encoding screwing up the offsets makes total sense. What I'm at a loss for is why it affects the hard coded portion of the string passed to puts: Example: puts "ret: #{ret}" Output: Oet: [part but not all of the expected string - 2 chars too short] At this point I plan on using Nokogiri but I am really curious what is causing what I describe above. This is a weirdness for how strings / puts works that I'd like to understand and keep in mind going forward. Thanks! -- Posted via http://www.ruby-forum.com/.