itinance / itinance/react-native-fs
"ascii" encoding behavior
- Dominant language
- C++
- Stars
- 5k
- Forks
- 1k
- PR merge metrics
- No merged PRs in 30d
Description
RNFS seems to treat `ascii` type as binary string. This is not actually explained anywhere in the README but is obvious in the treatment in the codebase. We use it to [read](https://github.com/SheetJS/js-xlsx/blob/master/demos/react/react-native.js#L41) and [write](https://github.com/SheetJS/js-xlsx/blob/master/demos/react/react-native.js#L67) binary data in React Native.
1) The readme currently recommends using `base64` for reading and writing binary files. Is there a reason not to use the current `ascii` encoding to read or write binary strings?
2) Given the behavior, would it make sense to make `binary` follow the current `ascii` behavior?
3) Should `ascii` be changed to remove non-ASCII characters (or just take the lowest 7 bits of the individual character codes)?
Related: https://github.com/itinance/react-native-fs/issues/204
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.