Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Encoding problem in RStudio viewer pane but not in rmarkdown html output #30

Closed
renkun-ken opened this issue Oct 21, 2015 · 3 comments
Closed
Milestone

Comments

@renkun-ken
Copy link
Owner

When a data frame with unicode characters (e.g. Chinese), the formattable is not correctly rendered in RStudio viewer pane but rendered correctly in html document produced by rmarkdown renderer.

df <- data.frame(id = 1:2, name = c("小明", "小红"), age=c(10,20))
formattable(df)

The locale of the R session must be set as Chinese first using

Sys.setlocale(locale = "Chinese")
@renkun-ken
Copy link
Owner Author

I trace the execution in formattable:::as.htmlwidget.formattable and the encoding is well preserved everywhere before htmlwidgets::createWidget is finally called. Then I guess the problem occurs in this function.

@renkun-ken
Copy link
Owner Author

The encoding problem is fixed in v0.2 branch.

@renkun-ken renkun-ken added this to the v0.2 milestone Jun 11, 2016
renkun-ken added a commit that referenced this issue Jun 11, 2016
@github-actions
Copy link

This old thread has been automatically locked. If you think you have found something related to this, please open a new issue and link to this old issue if necessary.

@github-actions github-actions bot locked and limited conversation to collaborators Apr 21, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant