From: James Gray Date: 2008-12-16T00:20:11+09:00 Subject: Re: ruby 1.9.1: Encoding trouble: broken US-ASCII String On Dec 15, 2008, at 9:07 AM, Tom Link wrote: >> There's a lot going on here, so it's a lot to take in. In places, >> the >> behavior is a little complex. However, the core team has put a lot >> of >> effort into making the system easier to use. It's getting there. > > It would have been nice though if the defaults had been chosen so that > they don't break 1.8 scripts -- or use some 8bit clean encoding if the > data contains 8bit wide characters instead of throwing an error. I think it's probably more important to get this encoding interface right than to worry about 1.8 compatibility. We knew 1.9 was going to break some things, so the time was right. Also, if you've been using the -KU switch in Ruby 1.8 and working with UTF-8 data, 1.9 may work pretty well for you: http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/19552 That's a pretty common "best practice" in the Ruby community, from what I've seen. Even Rails pushes this approach now. If you have gone this way though, you may want to migrate to the even better -U switch in 1.9. James Edward Gray II