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

Force UTF8 encoding during writeLines #552

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

saurfang
Copy link

This should fix #549 where R writes file according to default locale if not otherwise specified. It caused a problem under Windows due to lack of support for UTF8 locale and rCharts assumes everything will be written in UTF8.

writeLines(.self$render(..., static = static_),
tf <- file.path(temp_dir, 'index.html')
)
tf <- file.path(temp_dir, 'index.html')
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest you open the file() connection here, and close it after writing the text. Otherwise the file() connection is still open after this function exits, and R might show you "Closed 1 unused connections".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

It seems rCharts doesn't work well with Chinese
2 participants