From: James Gray Date: 2008-12-15T23:00:31+09:00 Subject: [ruby-core:20573] Re: 1.9 character encoding (was: encoding of symbols) 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 > => # > > 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