rstudio/rmarkdown — pull request #73 by yihui (2014-04-24 22:14:25+00:00)
Title: Fix #70 on rmarkdown's side: read the HTML output using UTF-8

This does not completely fix the problem, and we still need to make a decision on whether to re-encode the websocket messages with UTF-8, i.e. should this option be FALSE instead of TRUE by default?

```s
options(shiny.transcode.json = FALSE)
```

See https://github.com/rstudio/shiny/blob/master/R/shiny.R#L350-L351 Jeff's example works if I set this option to FALSE under Windows.

Under *nix, UTF-8 is normally the default encoding, so there is no need to `iconv()` to UTF-8. Under Windows, UTF-8 often has problems (e.g. in this case, the websocket message can be garbled), and it is better to use the native encoding.

BTW, RStudio IDE should also pass the file encoding to `rmarkdown::run(..., render_args = list(encoding = ???))`. I'm not sure if this has already been done or not.

@jcheng5 @jjallaire