summaryrefslogtreecommitdiff
path: root/sample/rss
diff options
context:
space:
mode:
Diffstat (limited to 'sample/rss')
-rwxr-xr-xsample/rss/list_description.rb4
-rwxr-xr-xsample/rss/rss_recent.rb4
2 files changed, 4 insertions, 4 deletions
diff --git a/sample/rss/list_description.rb b/sample/rss/list_description.rb
index d4b98a9ac6..990974d8f5 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 38b57c37fa..14c861284e 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