On Dec 15, 2008, at 5:11 AM, Brian Candler wrote:

> Even BINARY seems to be a second-class alias:
>
> irb(main):010:0> a.force_encoding("BINARY")
> => "a\xC3\x9F"
> irb(main):011:0> a.encoding
> => #<Encoding:ASCII-8BIT>
>
> Ruby is telling me that all data is text, whereas I believe the  
> opposite is true :-)

BINARY is an alias for ASCII-8BIT.  The latter name is just a Rubyism  
to suggest that even with BINARY data, we somethings want to pick out  
the ASCII with a Regexp or the like.  The example typically given is  
the signature of a image file, like PNG.

James Edward Gray II