-
Notifications
You must be signed in to change notification settings - Fork 256
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
uft8 source file support #328
uft8 source file support #328
Conversation
…contain non-ASCII characters
This stems from wanting to read utf8 files on a non utf8 locale. On windows, the locale is set to the system default which typically does not support utf8 out of the box. sourceUTF8 functions are adopted form the rstudio/shiny repo in an effort to use code that has already be validated to work. The ending finding is that `source(file, encoding="UTF-8")` does not work as expected and instead should use `eval(parse(file, encoding = "UTF-8"))`
Codecov Report
@@ Coverage Diff @@
## master #328 +/- ##
==========================================
- Coverage 90.04% 88.86% -1.19%
==========================================
Files 26 27 +1
Lines 1145 1176 +31
==========================================
+ Hits 1031 1045 +14
- Misses 114 131 +17
Continue to review full report at Codecov.
|
We now understand why |
Fixes tests made in rstudio#331
* master: atheriel - remove connection close workaround (rstudio#318, rstudio#332)
Fixes: #312
This stems from wanting to read utf8 files on a non utf8 locale. On windows, the locale is set to the system default which typically does not support utf8 out of the box.
utf8.R
functions are adopted from the RStudio Shiny repo in an effort to use code that has already be validated to work.The end result is that
source(file, encoding="UTF-8")
does not work as expected and instead we should useeval(parse(file, encoding = "UTF-8"))
Other additions
testthat::test_path
when loading test filesctb