*** journal.rb	Mon Dec  8 10:31:46 2003
--- journal_sjis.rb	Mon Dec  8 13:13:23 2003
***************
*** 1,6 ****
--- 1,7 ----
  #!/usr/local/bin/ruby -Ke
  
  require 'net/http'
+ require 'nkf'
  
  =begin
  http://slashdot.jp ���������[�U�����L�����������N���X�B�R�����g�����������R�����g����������
***************
*** 68,75 ****
  	# ���L������
  	def getJournal(url, fn)
  		html = getHTML(url)
  		open(fn, "w"){|fh|
! 			fh.write(html)
  		}
  
  		# �t�@�C��������
--- 69,77 ----
  	# ���L������
  	def getJournal(url, fn)
  		html = getHTML(url)
+ 		html = html.gsub(/<meta http-equiv="Content-Type" content="text\/html; charset=euc-jp">/,'<meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">')
  		open(fn, "w"){|fh|
! 			fh.write(NKF.nkf('-s',html))
  		}
  
  		# �t�@�C��������
***************
*** 84,91 ****
  			if 1 < $1.to_i()
  				puts "http:\/\/slashdot.jp#{$2}"
  				html = getHTML("#{$2}&threshold=-1&mode=flat&commentsort=0&op=%CA%D1%B9%B9")
  				open(id + 'COMMENT.html', 'w'){|fh|
! 					fh.write(html)
  				}
  			end
  		end
--- 86,94 ----
  			if 1 < $1.to_i()
  				puts "http:\/\/slashdot.jp#{$2}"
  				html = getHTML("#{$2}&threshold=-1&mode=flat&commentsort=0&op=%CA%D1%B9%B9")
+ 				html = html.gsub(/<meta http-equiv="Content-Type" content="text\/html; charset=euc-jp">/,'<meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">')
  				open(id + 'COMMENT.html', 'w'){|fh|
! 					fh.write(NKF.nkf('-s',html))
  				}
  			end
  		end
