From: Joshua Ballanco Date: 2010-07-23T06:08:23+09:00 Subject: [ruby-core:31452] Re: [Feature #3595] Theres no encoding to differentiate a stream of Binary data from an 8-Bit ASCII string On Jul 22, 2010, at 12:42 PM, Roger Pack wrote: > I think his original complaint was that if he's passing back data from a method, like > > def give_me_your_binary_data > end > > The *can't* pass back a string that is marked as BINARY encoding, since querying for its encoding returns "ASCII-8BIT". > > See the previous discussion (which I think never quite terminated--any more thoughts there?) > Maybe it should be renamed as its default GENERIC and have ASCII-8BIT as an alias. > Thoughts? If this is the case, then I feel we're arguing semantics. There is no such thing as an "ASCII-8BIT" string (where by "string" I mean an array of characters that can be printed). Values 129-256 in an "ASCII-8BIT" string cannot be printed or converted to any other encoding. Personally, I'd be in favor of making "BINARY" the default and "ASCII-8BIT" the alias, but it shouldn't matter. - Josh