From 722f69a5ba8856eaa74623a8fef4bc6fcb542694 Mon Sep 17 00:00:00 2001 From: Joshua Date: Mon, 28 Aug 2017 17:17:15 -0300 Subject: [PATCH] fix #359 --- R/highmaps.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/highmaps.R b/R/highmaps.R index 17244492..bb147b9d 100644 --- a/R/highmaps.R +++ b/R/highmaps.R @@ -170,7 +170,7 @@ download_map_data <- function(url = "custom/world.js", showinfo = FALSE) { tmpfile <- tempfile(fileext = ".js") download.file(url, tmpfile) - mapdata <- readLines(tmpfile, warn = FALSE) + mapdata <- readLines(tmpfile, warn = FALSE, encoding = "UTF-8") mapdata[1] <- gsub(".* = ", "", mapdata[1]) mapdata <- paste(mapdata, collapse = "\n") mapdata <- jsonlite::fromJSON(mapdata, simplifyVector = FALSE)