I've converted from write.csv to write_csv for a few projects and am finding that write_csv handles special characters differently and results in very odd looking results when opened in Excel. I'm guessing it's related to writing to UTF-8? Here is an example where the dash is an en dash:
dat <- data.frame(a=1:2, b=c("reported – estimate", "updated – estimate"))
write.csv(dat, "d:/junk/writecsv.csv")
readr::write_csv(dat, "d:/junk/readr.csv")
The file from write.csv looks perfect in Excel and when looking at the raw data. The example from readr looks like this in raw:

and this in Excel:

In my own use case I'm taking advantage of the format_csv function so it's not an easy conversion to go back to write.csv -- I'd love to continue using readr.
I've converted from write.csv to write_csv for a few projects and am finding that write_csv handles special characters differently and results in very odd looking results when opened in Excel. I'm guessing it's related to writing to UTF-8? Here is an example where the dash is an en dash:
The file from write.csv looks perfect in Excel and when looking at the raw data. The example from readr looks like this in raw:
and this in Excel:
In my own use case I'm taking advantage of the format_csv function so it's not an easy conversion to go back to
write.csv-- I'd love to continue usingreadr.