Closed chainsawriot closed 1 year ago
For 2, a technique is to use writeLines similar to readODS
v2.0.0
.write_as_utf8 <- function(text, con) {
writeLines(enc2utf8(text), con = con, sep = "", useBytes = TRUE)
}
This GHA #331 run confirmed that exporting JSON on non-UTF-8 machines (e.g. R < 4.2 on Windows) is not UTF-8 safe. The same issue as readODS v1.8.0.
...
is not consistently passed, although write_feather should be fine (there are only two arguments; but could be more in the future). Butwrite_ods
has more arguments now.https://github.com/chainsawriot/rio/blob/01e55d2fd6dd1ee8c59ea782541d57353621d3c1/R/export_methods.R#L147-L150
https://github.com/chainsawriot/rio/blob/01e55d2fd6dd1ee8c59ea782541d57353621d3c1/R/export_methods.R#L250-L253
Created on 2023-08-30 with reprex v2.0.2
cat
is locale dependent; should set locale to UTF-8 ropensci/readODS#107https://github.com/chainsawriot/rio/blob/01e55d2fd6dd1ee8c59ea782541d57353621d3c1/R/export_methods.R#L304-L307
https://github.com/chainsawriot/rio/blob/01e55d2fd6dd1ee8c59ea782541d57353621d3c1/R/export_methods.R#L206-L209