* lib/rdoc/rdoc.rb (parse_files): don't depend on the default external
encoding. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14744 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
07c730fcbc
commit
7ee205d1d1
@ -1,3 +1,8 @@
|
|||||||
|
Fri Dec 28 01:27:47 2007 Tanaka Akira <akr@fsij.org>
|
||||||
|
|
||||||
|
* lib/rdoc/rdoc.rb (parse_files): don't depend on the default external
|
||||||
|
encoding.
|
||||||
|
|
||||||
Fri Dec 28 00:01:57 2007 NAKAMURA Usaku <usa@ruby-lang.org>
|
Fri Dec 28 00:01:57 2007 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||||
|
|
||||||
* common.mk (golf_prelude.c): use MINIRUBY instead of BASERUBY because
|
* common.mk (golf_prelude.c): use MINIRUBY instead of BASERUBY because
|
||||||
|
@ -219,7 +219,7 @@ module RDoc
|
|||||||
file_list.each do |fn|
|
file_list.each do |fn|
|
||||||
$stderr.printf("\n%35s: ", File.basename(fn)) unless options.quiet
|
$stderr.printf("\n%35s: ", File.basename(fn)) unless options.quiet
|
||||||
|
|
||||||
content = File.open(fn, "r") {|f| f.read}
|
content = File.open(fn, "r:ascii-8bit") {|f| f.read}
|
||||||
if /coding:\s*(\S+)/ =~ content[/\A(?:.*\n){0,2}/]
|
if /coding:\s*(\S+)/ =~ content[/\A(?:.*\n){0,2}/]
|
||||||
if enc = Encoding.find($1)
|
if enc = Encoding.find($1)
|
||||||
content.force_encoding(enc)
|
content.force_encoding(enc)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user