diff options
author | kou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-05-16 08:50:38 +0000 |
---|---|---|
committer | kou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-05-16 08:50:38 +0000 |
commit | 26307f3f8b935a604d3fe69d92c2714680a8060d (patch) | |
tree | 5f2ce63701aa116e72771d325bccc151ae0b44de /sample | |
parent | efa8ad2334d5adcd652406737b4d5c45426493ad (diff) | |
download | ruby-26307f3f8b935a604d3fe69d92c2714680a8060d.tar.gz ruby-26307f3f8b935a604d3fe69d92c2714680a8060d.tar.xz ruby-26307f3f8b935a604d3fe69d92c2714680a8060d.zip |
* sample/rss/rss_recent.rb, sample/rss/list_description.rb: use UTF-8.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@23443 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'sample')
-rwxr-xr-x | sample/rss/list_description.rb | 4 | ||||
-rwxr-xr-x | sample/rss/rss_recent.rb | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/sample/rss/list_description.rb b/sample/rss/list_description.rb index d4b98a9ac..990974d8f 100755 --- a/sample/rss/list_description.rb +++ b/sample/rss/list_description.rb @@ -4,7 +4,7 @@ require "nkf" 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 @@ ARGV.each do |fname| 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 diff --git a/sample/rss/rss_recent.rb b/sample/rss/rss_recent.rb index 38b57c37f..14c861284 100755 --- a/sample/rss/rss_recent.rb +++ b/sample/rss/rss_recent.rb @@ -4,7 +4,7 @@ require "nkf" 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 @@ ARGV.each do |fname| 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 |