â [ruby] open-uriã§UTF-8ã§ãªããã¼ã¸ãåå¾ããã¨ãã®æ³¨æ Rubyæ¨æºæ·»ä»ã®open-uriã©ã¤ãã©ãªã使ãã¨ãHTMLãç°¡åã«åå¾ãããã¨ãã§ããã irb> require 'open-uri' irb> url = "http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-dev/43008" irb> html = open(url).read ãã®ã¨ããæåã³ã¼ããUTF-8ã§ãªããã¨ãåãã£ã¦ãããªãã第äºå¼æ°ã§ã¨ã³ã³ã¼ãã£ã³ã°åãæå®ãã¦ãããæ¹ãè¯ãã ããã(ããããããã¯Ruby 1.9ã®è©±ã§ãã) irb> html = open(url, "r:euc-jp").read èªãã ãã¨ã¯ãString#encodeã§UTF-8ã«å¤æãããã¨ãã§ããã irb> html = open(url,
{{#tags}}- {{label}}
{{/tags}}