From: Roger Pack Date: 2010-11-16T02:03:43+09:00 Subject: [ruby-core:33199] Re: not use system for default encoding A few reactions... > == Option 2 > >> Have a universally-compatible "BINARY" encoding. >> Any operation between BINARY and FOO gives encoding BINARY, >> and transcoding between BINARY and any other encoding is a null operation. Is setting Encoding.default_external to BINARY the same effect as this? (all strings will be binary, thus they will all have every operation result in binary...) > This will hide unexpectedly mixed BINARY string. > You'll realize hard to debug such strings. True hard to debug if several different encodings are merged. Perhaps you could make it "opt-in" to use this universal encoding proposed? >> Open all files in BINARY mode, except where explicitly asked: >> �File.open("/etc/passwd","r:locale") > > I want to do this if people accept this, but I think they don't. I would accept it :) Thanks for the feedback. I think it only helps ruby get better. Maybe another option is a command line switch like --binary_only (avoids all encodings, does only ASCII-8BIT) or make it so that setting Encoding.default_external and default_internal to ASCII-8BIT would have the same effect... Just thinking out loud. Cheers! -r