Gon?alo Silva wrote:
> 
> While I believe that this is a necessary evil for the real encoding
> support that ruby currently provides, it would be great to have a
> compile time flag to revert back to the old behavior (or something
> similar). I don't think this is implemented, but I could be wrong.

It appears that defining NO_LOCALE_CHARMAP when building ruby, may
have this effect:

$ git branch
* ruby_1_9_3

$ cflags='-DNO_LOCALE_CHARMAP' ./configure --prefix=/opt/ruby193 --program-suffix=19 --enable-shared --disable-install-doc
$ make
$ sudo make install

$ /opt/ruby193/bin/ruby19 -v -e 'puts "".encoding'
ruby 1.9.3dev (2011-10-11 revision 33457) [x86_64-linux]
ASCII-8BIT

$ /opt/ruby193/bin/ruby19 -e 'puts `ls`.encoding'
ASCII-8BIT


Hope this helps,

Bill