Skip to content

Commit fed7b10

Browse files
committed
Merge branch 'fix-jp-file-read' of https://github.com/ropensci/plotly into fix-jp-file-read
2 parents 3a6b9b4 + 5a40038 commit fed7b10

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: R/print.R

+2-2
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ knit_print.plotly <- function(x, options, ...) {
4141
#' @export
4242
print.offline <- function(x, ...) {
4343
off <- offline_bundle(jq = TRUE)
44-
plotlyjs <- readChar(off, file.info(off)$size)
44+
plotlyjs <- readChar(off, file.info(off)$size, useBytes=TRUE)
4545
html <- sprintf(
4646
'<!DOCTYPE html><html lang="en">
4747
<head>
@@ -80,7 +80,7 @@ knit_print.offline <- function(x, options, ...) {
8080
# if this is the first plot, place bundle just before the plot
8181
if (length(knitr::knit_meta(class = "plotly", clean = FALSE)) == 0) {
8282
off <- offline_bundle(jq = TRUE)
83-
b <- readChar(off, file.info(off)$size)
83+
b <- readChar(off, file.info(off)$size, useBytes=TRUE)
8484
p <- paste0(
8585
sprintf('<script type="text/javascript">%s</script>', b),
8686
p

0 commit comments

Comments
 (0)