You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Sourcing an open script file as a job fails if the path contains non-ASCII characters on Windows #6701
The issue is likely that the attempt to re-encoded paths from UTF-8 to the system encoding is failing here. We might instead try avoiding this need to re-encode paths by writing out an R script (as UTF-8) and telling R to just source that script as though it were UTF-8 encoded.
Notes for the future: @kevinushey It's interesting that this didn't work for you because I retested last week and it worked fine with @jarauh's example. It's may be varying per encoding.
This scenario works in latest RStudio (I tested 2026.08.0-daily+90). I created a folder named 脚本, put a script in it, and was able to source it as a local job. Given the age of this issue, a LOT of code has changed (including a port to Electron and support for utf8 in Windows), so not too surprised.
Activity
R-Hannibal commentedon Apr 22, 2020
@jarauh Thank you so much for reporting this issue, we'll have the dev team take a look.
I was able to reproduce the issue in RStudio Versions 1.2, 1.3, and 1.4, including the error message that is served up in the Jobs pane below:
mikebessuille commentedon Jun 29, 2020
ooops didn't mean to close this...
kevinushey commentedon Jul 1, 2020
This is where we form the command used to run R:
rstudio/src/cpp/session/modules/jobs/ScriptJob.cpp
Lines 139 to 166 in 4f6a6a7
The issue is likely that the attempt to re-encoded paths from UTF-8 to the system encoding is failing here. We might instead try avoiding this need to re-encode paths by writing out an R script (as UTF-8) and telling R to just source that script as though it were UTF-8 encoded.
15 remaining items
mikebessuille commentedon Oct 19, 2020
unfortunately it's too late for this in 1.4 at this point; moving to 1.5
melissa-barca commentedon Oct 19, 2020
Notes for the future:
@kevinushey It's interesting that this didn't work for you because I retested last week and it worked fine with @jarauh's example. It's may be varying per encoding.
kevinushey commentedon Oct 19, 2020
In my case, I was using Chinese characters + an English locale, and since those cannot be expressed in an English locale (codepage) that's likely why.
gtritchie commentedon Jul 20, 2026
This scenario works in latest RStudio (I tested 2026.08.0-daily+90). I created a folder named
脚本, put a script in it, and was able to source it as a local job. Given the age of this issue, a LOT of code has changed (including a port to Electron and support for utf8 in Windows), so not too surprised.