title: Error in nchar(desc) : invalid multibyte string, element 1 when web scraping when using map() and rvest
body: <p>I am trying to scrape multiple webpages more efficiently with <code>purrrs::map()</code>. If I use <code>read_html()</code> on each link on its own, it works, however, if I try to achieve the same thing with <code>map()</code>, R Returns</p>
  
  <blockquote>
    <p>Error in nchar(desc) : invalid multibyte string, element 1</p>
  </blockquote>
  
  <p>Below I pasted a minimal replicable example. The string itself seems to be fine, I entered several strings as Vector into <code>tmp</code> and always got the same error. How do I fix this?</p>
  
  <pre><code>library(rvest)
  library(tidyverse)
  tmp &lt;- c("https://www.r-bloggers.com/web-scraping-and-invalid-multibyte-string/","https://blog.rstudio.com/2014/11/24/rvest-easy-web-scraping-with-r/")
  tmp
  # does not work
  map(tmp,read_html)
  # works
  read_html(tmp[1])
  read_html(tmp[2])
  
  # suggestion 1
  Sys.setlocale("LC_CTYPE", "en_US.UTF-8")
  # does still not work
  map(tmp,read_html)
  # works
  read_html(tmp[1])
  read_html(tmp[2])
  
  Sys.setlocale("LC_ALL", "English")
  
  # does still not work
  map(tmp,read_html)
  # works
  read_html(tmp[1])
  read_html(tmp[2])
  </code></pre>