ruby-changes:11802
From: kou <ko1@a...>
Date: Sat, 16 May 2009 19:35:11 +0900 (JST)
Subject: [ruby-changes:11802] Ruby:r23457 (ruby_1_8): merge r23443.
kou 2009-05-16 19:34:59 +0900 (Sat, 16 May 2009) New Revision: 23457 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=23457 Log: merge r23443. * sample/rss/rss_recent.rb, sample/rss/list_description.rb: use UTF-8. Modified files: branches/ruby_1_8/ChangeLog branches/ruby_1_8/sample/rss/list_description.rb branches/ruby_1_8/sample/rss/rss_recent.rb Index: ruby_1_8/ChangeLog =================================================================== --- ruby_1_8/ChangeLog (revision 23456) +++ ruby_1_8/ChangeLog (revision 23457) @@ -1,3 +1,8 @@ +Sat May 16 19:35:48 2009 Kouhei Sutou <kou@c...> + + * sample/rss/rss_recent.rb, sample/rss/list_description.rb: use + UTF-8. + Sat May 16 19:34:09 2009 Kouhei Sutou <kou@c...> * lib/rss/rss.rb, test/rss/test_version.rb (RSS::VERSION): Index: ruby_1_8/sample/rss/list_description.rb =================================================================== --- ruby_1_8/sample/rss/list_description.rb (revision 23456) +++ ruby_1_8/sample/rss/list_description.rb (revision 23457) @@ -4,7 +4,7 @@ class String # From tdiary.rb def shorten( len = 120 ) - lines = NKF::nkf( "-e -m0 -f#{len}", self.gsub( /\n/, ' ' ) ).split( /\n/ ) + lines = NKF::nkf( "-t -m0 -f#{len}", self.gsub( /\n/, ' ' ) ).split( /\n/ ) lines[0].concat( '...' ) if lines[0] and lines[1] lines[0] end @@ -52,7 +52,7 @@ puts "#{fname} does not include RSS 1.0 or 0.9x/2.0" else begin - rss.output_encoding = "euc-jp" + rss.output_encoding = "utf-8" rescue RSS::UnknownConversionMethodError error($!) if verbose end Index: ruby_1_8/sample/rss/rss_recent.rb =================================================================== --- ruby_1_8/sample/rss/rss_recent.rb (revision 23456) +++ ruby_1_8/sample/rss/rss_recent.rb (revision 23457) @@ -4,7 +4,7 @@ class String # From tdiary.rb def shorten( len = 120 ) - lines = NKF::nkf( "-e -m0 -f#{len}", self.gsub( /\n/, ' ' ) ).split( /\n/ ) + lines = NKF::nkf( "-t -m0 -f#{len}", self.gsub( /\n/, ' ' ) ).split( /\n/ ) lines[0].concat( '...' ) if lines[0] and lines[1] lines[0] end @@ -51,7 +51,7 @@ puts "#{fname} does not include RSS 1.0 or 0.9x/2.0" else begin - rss.output_encoding = "euc-jp" + rss.output_encoding = "utf-8" rescue RSS::UnknownConversionMethodError error($!) if verbose end -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/