Repository navigation
mark R strings in RPC methods as UTF-8 - #8448
Merged
Merged
Conversation
Member
|
This seems like a good idea, but an encoding-related change this deep in the RPC mechanism seems like it wants more runway than we have. Do we absolutely need this for 1.4? (Neither of those bugs looks like a regression at first blush.) |
Collaborator
Author
|
If we preferred a more narrow fix for 1.4, I could just explicitly mark the encoding in |
Collaborator
Author
|
#8449 is the more narrow version of the fix scoped to the problem @melissa-barca saw. |
Member
|
Just merged that one -- can you rebase this to Juliet Rose? |
kevinushey
force-pushed
the
bugfix/r-json-rpc-utf8
branch
from
December 3, 2020 20:33
e060563 to
8714ff8
Compare
Collaborator
Author
|
Rebased to JR. |
4 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Intent
Whenever an RPC method is invoked, it's normally done with JSON data received from the client. Any such strings in that JSON are always UTF-8 encoded. However, when the associated R string is created from that JSON string, we were not marking the encoding. Hence, we ended up with data that was UTF-8 encoded, but interpreted as though it were in the native encoding.
This causes issues of this form on Windows:
#8435 (comment)
A way to convince yourself is with something like the following:
And this is exactly the kind of mojibake seen in #8435 (comment).
Approach
Use the associated UTF-8 APIs in
RFunctionwhen adding strings from JSON.QA Notes
On a Windows account with the name
Crème Brûlée, confirm that you can create a new R package project.Closes #8435.
Closes #8445.