-
Notifications
You must be signed in to change notification settings - Fork 353
Closed
Description
i try to scrape a webpage http://www3.boj.or.jp/market/jp/stat/of141205.htm
require(rvest)
url='http://www3.boj.or.jp/market/jp/stat/of141205.htm'
# bad, return string like: I�t�@�[ (12��5�ú���à��)
html(url, encoding='utf-8') %>% html_nodes('title') %>% html_text()
html(url, encoding='SHIFT_JIS') %>% html_nodes('title') %>% html_text()
# good, return: オファー (12月5日<金>)
html(readLines(url, encoding='utf-8')) %>% html_nodes('title') %>% html_text()
what is the difference between `html` and `readLines` in deal with encoding?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels