[Rails] Re: Net:HTTP incorrect content retrieved

2014-05-18 Thread Nick T.
Matt, really thanks a lots. and I will put the question correctly into ruby path -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it

[Rails] Net:HTTP incorrect content retrieved

2014-05-17 Thread Nick T.
Hi All, I am just trying to get some data from different website for studying and testing. I could get web content successfully from some sites with UTF-8 encoding. However, when I try to access http://bet.hkjc.com/football/index.aspx?lang=ch&pageno=1 I got below content from response.body (eve

[Rails] Problem on reading a web page (no matter using Net:HTTP or nokogiri)

2014-05-17 Thread Nick T.
Currently I am trying to get some reference data from bet.hkjc.com/football/index.aspx?lang=ch&pageno=1 However, I could not read the content (page source) properly even though I used force_encoding or String.encode! after getting the response.body Same coding is working fine for other site, but