On Aug 26, 2008, at 09:55 AM, Yusuke ENDOH wrote:
> How's this topic going?  I seem to have similar trouble with cairo:
>
>
>> $ echo $LANG
>> C
>>
>> $ gem19 install cairo
>> Building native extensions.  This could take a while...
>> Successfully installed cairo-1.7.0
>> 1 gem installed
>>
>> $ gem19 uninstall cairo
>> WARNING:  /home/mame/work/ruby19/local/lib/ruby/gems/1.9.0/ 
>> specifications/cairo-1.7.0.gemspec:6: invalid multibyte char
>> /home/mame/work/ruby19/local/lib/ruby/gems/1.9.0/specifications/ 
>> cairo-1.7.0.gemspec:6: invalid multibyte char
>> /home/mame/work/ruby19/local/lib/ruby/gems/1.9.0/specifications/ 
>> cairo-1.7.0.gemspec:6: syntax error, unexpected $end, expecting ']'
>> ... s.authors = ["Evan Marin", "##yvind Kol#s", "MenTaLguY", "...
>> ...                               ^
>> WARNING:  Gem::Specification.new do |s|
>>  s.name = %q{cairo}
>>  s.version = "1.7.0"
> (snip)
>> end
>> ERROR:  While executing gem ... (Gem::InstallError)
>>    Unknown gem cairo >= 0
>>
>> $ LANG=ja_JP.UTF-8 gem19 uninstall cairo
>> Successfully uninstalled cairo-1.7.0
>
>
> Index: lib/rubygems/source_index.rb
> ===================================================================
> --- lib/rubygems/source_index.rb	(revision 18876)
> +++ lib/rubygems/source_index.rb	(working copy)
> @@ -80,7 +80,7 @@
>
>     def load_specification(file_name)
>       begin
> -        spec_code = File.read(file_name).untaint
> +        spec_code = File.read(file_name, :encoding =>  
> "UTF-8").untaint
>         gemspec = eval spec_code, binding, file_name
>         if gemspec.is_a?(Gem::Specification)
>           gemspec.loaded_from = file_name

I have added myself a note to fix this in RubyGems 1.3.