From: "NARUSE, Yui" Date: 2010-05-09T08:18:57+09:00 Subject: [ruby-core:30110] Re: suggestion: switch default name for BINARY encoding (2010/05/08 7:50), Roger Pack wrote: > Situation: > > Currently the encoding ASCII-8BIT "means" ascii and binary. No. ASCII-8BIT means ASCII compatible 8bit string; it has 256 characters. > There is also the BINARY encoding, which aliases ASCII-8BIT. > > Confusion is caused by the fact that by default, strings' encoding is > ASCII-8BIT, which actually means ASCII *and* BINARY. No. ASCII-8BIT is not a default in Ruby. You may confused by the fact that rb_str_new returns ASCII-8BIT string and old extension library returns such strings. > Beginners have no idea what ASCII-8BIT means. But they do understand BINARY. ASCII-8BIT is different from the thing people will imagine by the name "BINARY", even if it aliased as BINARY. > Suggestion: use BINARY as the default encoding name with ASCII-8BIT as > the alias. Then the default encoding is BINARY (which people can > understand without as much difficulty). The name "BINARY" can't express it is ASCII-compatible. -- NARUSE, Yui