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

need to mark the returned path as UTF-8 #158

Merged
merged 1 commit into from Oct 14, 2019

Conversation

@shrektan
Copy link
Contributor

shrektan commented Oct 12, 2019

This is necessary for paths that contain multi-bytes chars on Windows. Otherwise it displays as Garbage.

Reproduce steps

  1. On Windows
  2. Run rstudioapi::selectFile()
  3. Select any file contains multiple-bytes.

You will find garbage letters in the output. After being marked as UTF-8, it becomes correct.

image

Should have

This API calls some functions I believe registered with RStudio, so the root cause may embeded in RStudioAPI.cpp and the fixes should be made there.

this is necessary for paths that contain multi chars on Windows
@kevinushey

This comment has been minimized.

Copy link
Contributor

kevinushey commented Oct 14, 2019

Thanks! This fix looks good to me.

@kevinushey kevinushey merged commit 0d1b0de into rstudio:master Oct 14, 2019
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@shrektan shrektan deleted the shrektan:selectFile-utf8 branch Oct 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.