-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
skip test that uses vcr if casssette is not UTF-8 #99
Comments
I think best approach is to take the string from the cassette and replace any non ascii strings with unicode equivalent, or if none found, then drop the non-ascii, or something else? ideally would use probably happen on the line after this or so https://github.com/ropensci/vcr/blob/master/R/serializers-yaml.R#L76 maybe: text_cleaner <- function(x) {
if (requireNamespace("stringi")) {
stringi::stri_escape_unicode(x)
} else {
# some other w/o stringi
}
} |
another reason to get that JSON serializer done sooner than later, it may help avoid these yaml pkg problems |
It seems so at least for my encoding problems. :-D |
right. it'd be nice to have a better yaml pkg, but its easier here to just recommend people use json if they have any issue |
Arose from recent realization that strings in cassettes, any string in the cassette (not just the response body), that are not UTF-8 can cause problems on some platforms, e.g.,
tools::showNonASCIIfile("tests/fixtures/cr_citation_count.yml")
tools::showNonASCIIfile("tests/fixtures/cr_cn_different_base_urls.yml")
tools::showNonASCIIfile("tests/fixtures//bison.yml")
tools::showNonASCIIfile("tests/fixtures/vcr_cassettes/dc_search_csv.yml")
Options:
skip_vcr_non_utf8()
The text was updated successfully, but these errors were encountered: