Project

General

Profile

Actions

Bug #1948

closed

RDoc Fails with Non-ASCII Pathnames

Added by runpaint (Run Paint Run Run) about 13 years ago. Updated over 11 years ago.

Status:
Closed
Priority:
Normal
Target version:
ruby -v:
ruby 1.9.2dev (2009-08-05 trunk 24397) [i686-linux]
Backport:
[ruby-core:24958]

Description

=begin
rdoc fails when the pathname is non-ASCII. This happens with or without the 'charset' option set to UTF-8. For example:

$ cat möbius.rb

coding: utf-8

class Integer

 def mobius
   case
     when (self < 1)                 then nil
     when (square_free? and ω.even?) then 1
     when (square_free? and ω.odd?)  then -1
     when (not square_free?)         then 0
   end
 end

 alias :möbius :mobius
 alias :μ :mobius

end

$ rdoc möbius.rb

möbius.rb: Cm
Generating HTML...
(erb):45:in concat': incompatible character encodings: UTF-8 and US-ASCII (Encoding::CompatibilityError) from (erb):45:in write_html_on'
from /usr/local/lib/ruby/1.9.1/erb.rb:753:in eval' from /usr/local/lib/ruby/1.9.1/erb.rb:753:in result'
from /usr/local/lib/ruby/1.9.1/rdoc/template.rb:57:in block in write_html_on' from /usr/local/lib/ruby/1.9.1/rdoc/template.rb:56:in reverse_each'
from /usr/local/lib/ruby/1.9.1/rdoc/template.rb:56:in write_html_on' from /usr/local/lib/ruby/1.9.1/rdoc/generator.rb:787:in write_on'
from /usr/local/lib/ruby/1.9.1/rdoc/generator/html.rb:232:in block (2 levels) in gen_into' from /usr/local/lib/ruby/1.9.1/rdoc/generator/html.rb:231:in open'
from /usr/local/lib/ruby/1.9.1/rdoc/generator/html.rb:231:in block in gen_into' from /usr/local/lib/ruby/1.9.1/rdoc/generator/html.rb:216:in each'
from /usr/local/lib/ruby/1.9.1/rdoc/generator/html.rb:216:in gen_into' from /usr/local/lib/ruby/1.9.1/rdoc/generator/html.rb:179:in generate_html'
from /usr/local/lib/ruby/1.9.1/rdoc/generator/html.rb:86:in generate' from /usr/local/lib/ruby/1.9.1/rdoc/rdoc.rb:279:in document'
from /usr/local/bin/rdoc:15:in `'

(I'm not sure whether to file RDoc bugs on the RubyForge tracker or here w.r.t 1.9. Apologies if I guessed wrongly.)
=end


Related issues 1 (0 open1 closed)

Related to Ruby master - Feature #2635: Unbundle rdocRejectedmatz (Yukihiro Matsumoto)01/23/2010Actions
Actions #1

Updated by drbrain (Eric Hodel) about 13 years ago

  • Assignee set to drbrain (Eric Hodel)

=begin
I prefer the RubyForge tracker, but I look here too :)
=end

Actions #2

Updated by yugui (Yuki Sonoda) almost 13 years ago

  • Target version set to 1.9.2

=begin

=end

Actions #3

Updated by drbrain (Eric Hodel) over 12 years ago

=begin
I have fixed this in rdoc trunk
=end

Actions #4

Updated by drbrain (Eric Hodel) over 12 years ago

=begin
UTF-8 method names are checked in, but I did not test UTF-8 file name.

I still need to test that part.
=end

Actions #5

Updated by drbrain (Eric Hodel) over 12 years ago

  • Status changed from Open to Closed

=begin
UTF-8 file names appear to work correctly too.
=end

Actions

Also available in: Atom PDF