Skip to content

Commit

Permalink
test readr read_lines in readISO19139
Browse files Browse the repository at this point in the history
  • Loading branch information
eblondel committed Jun 2, 2022
1 parent 1df0aa5 commit 98de2d9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Description: Provides facilities to handle reading and writing of geographic met
and encoded using the ISO 19139 (XML) standard. It includes also a facility to check
the validity of ISO 19139 XML encoded metadata.
Depends: R (>= 3.3.0)
Imports: methods, R6, XML, httr, jsonlite, keyring
Imports: methods, R6, XML, httr, jsonlite, keyring, readr
Suggests: sf, ncdf4, EML, emld, units, testthat, roxygen2
License: MIT + file LICENSE
URL: https://github.com/eblondel/geometa/wiki
Expand Down
2 changes: 1 addition & 1 deletion R/readISO19139.R
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ readISO19139 <- function(file = NULL, url = NULL, raw = FALSE){
doc <- content(req, as = "text", encoding = encoding)
raw_xml <- XML::xmlParse(doc, encoding = encoding, addFinalizer = FALSE)
}else{
raw_xml <- suppressWarnings(readLines(file, encoding = encoding))
raw_xml <- readr::read_lines(file)
raw_xml <- paste0(raw_xml, collapse="")
if(Encoding(raw_xml) != "UTF-8") Encoding(raw_xml) <- "UTF-8"
if(Encoding(raw_xml) == "unknown"){
Expand Down

0 comments on commit 98de2d9

Please sign in to comment.