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.
I have a package that imports
lzstring. I test my package on different OS including windows machines using RHub workflows. I got errors in(r-release-windows-x86_64) (R-release)and(r-oldrel-windows-x86_64) (R-oldrel).The traceback is as follows:
It took me a while to find out what's going on. Even a simple
lzstring::compressToEncodedURIComponent("Hello World!")failed.I made a print the source of the
lzstring:::convert_to_utf16lefunction and this is what I got:In particular:
bom_le <- charToRaw("ÿþ").Then this happens:
Then the if is false and
c3 bf c3 beis appended:(as opposed to the expected
ff fe 74 00 65 00 73 00 74 00value)Then this throws.
This PR is an attempt to fix this.