On Feb 27, 2008, at 18:27 PM, Nobuyoshi Nakada wrote:
> At Thu, 28 Feb 2008 01:10:48 +0900,
> Austin Ziegler wrote in [ruby-core:15674]:
>> I'm releasing an updated version soon in any case (to just fix this
>> problem). Something should be worked out to make it easier for Ruby
>> 1.9 gems to have their spec in a non-US-ASCII format.
>
> Use magic comments.

There is a problem with backwards compatibility, I think.

The ruby file for a gem specification comes from a YAML file that  
ships with the gem.

I can add an encoding field to the gem specification for future gems,  
and write that encoding into the ruby file, but old gems may still fail.

Would it be sufficient to add the magic comment specifying ASCII-8BIT  
to all ruby gem specifications unless otherwise specified through a  
gemspec attribute?

I think so, because I don't know what character set any particular  
gem's data is actually in.  Will there still be a problem with YAML,  
though?