From: Dave Thomas Date: 2008-12-13T23:49:17+09:00 Subject: [ruby-core:20529] Re: encoding of symbols On Dec 13, 2008, at 5:33 AM, Charles Oliver Nutter wrote: > > Very good point; symbols are not necessarily created in the file > where you use their literal form, and therefore need to have a > single encoding everywhere. I concur. Maybe, to avoid confusion, symbols should be constrained to be US- ASCII then. Otherwise we have a strange situation where the order in which files are required affects the internal encoding of a symbol, and that seems wrong. In theory, we say "the value of :fred is the same where ever it occurs. But as it stands now, that's no longer true�the value of a symbol depends on the order that files are required. :ol� uncoded with iso-8859-1 is a different symbol to :ol� encoded utf-8. It's analogous to the situation where we could set the default base for the interpretation of numeric literals. If that base is local to a source file, then the behavior is well defined. But if instead we say that the base of a number depends on the base that was in effect the first time that literal was encountered, then chaos would ensue. Clearly with symbols the situation is not quite as immediate, but the principle is the same. Basically, we're saying that the value of :ol�.succ is no longer well defined. Dave