Skip to content

Commit

Permalink
UTF-8 WHO French decoding, fixes #192
Browse files Browse the repository at this point in the history
Thanks to @patrickmdnet, actually fix part about UTF-8 decoding of French WHO data a8b4a73
  • Loading branch information
Jack Wasey committed May 26, 2020
1 parent 7ee047d commit fa0eb44
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions R/who.R
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
)
}
} # end 400+
json_data <- rawToChar(http_response$content)
json_data <- httr::content(http_response, simplifyDataFrame=TRUE)
jsonlite::fromJSON(json_data)
}

Expand All @@ -91,7 +91,8 @@
}

#' Get the children of a concept (ICD-10 chapter, code or range)
#' @param concept_id NULl for root, concept string for any leaf or intermediate.
#' @param concept_id \code{NULL} for root, concept string for any leaf or
#' intermediate.
#' @examples
#' .dl_icd10who_children("XXII")
#' .dl_icd10who_children("U84")
Expand Down Expand Up @@ -301,5 +302,10 @@
}

.downloading_who_message <- function() {
message("Downloading or parsing cached WHO ICD data. This may take a few minutes. Data is cached, so if there is a download error, repeating the instruction will return the data immediately if cached, or pick up where it left off.") # nolint
message(paste(
"Downloading or parsing cached WHO ICD data.",
"This may take a few minutes.",
"Data is cached, so repeating the command will return immediately,",
"or finish caching, then return."
))
}

0 comments on commit fa0eb44

Please # to comment.