Hi,

In message "Re: nil encoding as synonym for binary encoding"
    on Fri, 11 Jan 2008 15:37:30 +0900, Gary Wright <gwtmp01 / mac.com> writes:

|If I grab an Ethernet packet off the wire, part of it is going to be
|binary data that has absolutely no relationship to characters/glyphs
|yet part of it might be a TCP segment containing UTF-8 data from an
|HTTP session.  What does it mean to have 'ASCII-8BIT' for such a
|sequence?
|
|I can understand the idea that every string has an encoding as long
|as one of those encodings means "it's just bytes".  If 'ASCII-8BIT'
|is that encoding, why is 'ASCII' even in the name?  It seems
|intuitive to me that a 'nil' encoding be the 'bucket of bytes'
|interpretation.

As Akira Tanaka stated in [ruby-core:14617] and [ruby-core:14657], we
unconsciously treat sequence of bytes to include alphanumeric
characters sometimes.  Separating them thoroughly may not be
convenient.

Regarding the original issue, nil for encoding behaves differently IO
related methods e.g. IO#set_encoding where nil means 'default'.

							matz.