Open
Description
Dear @seankross ,
First, I want to thank the swirldev team of developing swirl. In the last semester, I used swirl to teach R in National Taiwan University. The feedback from the students are very positive and I think they love the style of learning R with swirl.
However, there is a an issue which bothers my students. On windows, the R keeps printing a warning message like:
In grepl("\n", lines, fixed = TRUE) :
input string 1 is invalid in this locale
Do you have any idea of the reason?
Best,
Wush
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
seankross commentedon Jan 21, 2016
Hi @wush978,
That's amazing news! I would love to hear more about you experience using swirl in the classroom. What locale are your students using? Could one of them paste the result of
sessionInfo()
here? Also what's one example of a swirl question that shows the warning? I'll try to reproduce it.Sean
wush978 commentedon Jan 22, 2016
Hi @seankross ,
I am trying to create a minimal example of this issue, but I failed. After collecting more information and creating a reproducible example, I'll update it to here.
Thanks,
Wush
macnversion commentedon Sep 18, 2016
hi @seankross @wush978
I had same experiences weeks ago. Finally I find clear all history entries could fix it, but I don't understand why it would be this.
Best.
wush978 commentedon Mar 11, 2017
Hi @seankross and @macnversion ,
I understand the reason.
I found some
source
and other IO functions which read the source code from file. On my courses, these scripts are stored with encodingUTF-8
, but the default chinese encoding for Chinese Traditional windows users areBIG5
. Similar issues might be occurred for other non-English courses.The solution is to add the argument
encoding = "UTF-8"
, in my case, to these functions or connections. More generally, providing the default encoding or a hook before parsing might be a more robust solution.Best,
Wush
coverboy commentedon May 16, 2017
Thanks. @wush978 !!