Conversation
|
Illustration of current functionality in this PR: Invalid characters are displayed differently depending on machine support:
Why do we care about which characters we can distinguish? These methods support conversions like Another avenue to consider is to instead use something like We could use There's a bit of a rabbit hole we could fall into with this fix. Ideally, we just fix the |
|
Updates:
Unfortunately there isn't a great way to advertise this functionality -- the error message just reads: That stems from |
|
I think this can be reviewed/merged. Fixed a small bug due to me misunderstanding how |
THIS IS A WIPEarly stage work-in-progress solution for discussion in #65.
Goals:
BStringobject contains a null byte (as.raw(0))BStringandraw/integervectorsThe issue in (1) is that a
BStringcontaining a null byte throws an error whenever R tries to display the position(s) containins the null byte. This leads users to think that the object itself is corrupted, when in fact it's purely an error with R attempting to display it on the console.as.integer()and other methods work properly on these objects.This issue would be more obvious if more people used
BStringobjects with values in the complete 0:255 range, but building aBStringfrom bytes is currently very difficult. Helper functions to createBStrings from raw vectors would be preferable.This PR will be blocked from merging until it's actually finalized; currently displaying to organize thoughts and reprexes.