From: Austin Ziegler Date: 2008-09-23T13:04:44+09:00 Subject: [ruby-core:18802] Re: Character encodings - a less radical suggestion On Mon, Sep 22, 2008 at 11:04 PM, Michael Selig wrote: > As long as "default_internal" is used sanely, I actually think that it may > IMPROVE the library support situation, because its use will make "encoding > compatibility errors" less likely to rear their ugly heads. What if it's "set once"? It's treated as essentially frozen after it's set for the first time. Something like: def Encoding.default_internal=(encoding) raise "Internal Encoding Already set" if @default_internal_set @default_internal_set = true @default_internal = encoding end It would be treated as read-only if set by a command-line parameter or after the first time it's set to an explicit value. This would discourage people from setting it in libraries (it would break automatically). -austin -- Austin Ziegler * halostatue@gmail.com * http://www.halostatue.ca/ * austin@halostatue.ca * http://www.halostatue.ca/feed/ * austin@zieglers.ca