String translation between React-Native and Java is Trimming #32412
Labels
Needs: Attention
Issues where the author has responded to feedback.
Needs: Environment Info
Please run `react-native info` and edit your issue with that command's output.
Resolution: Locked
This issue was locked by the bot.
I have a JS Uint8array that contains binary data, which is converted to a string and sent to Java which reads the string. These strings/byte arrays are made using protocol buffers. The string in JS is "R\u0000", with "\u0000" being a null code. When the string arrives in Java, it is only "R" and the \u0000 is stripped. The typecasting from JS to Java is stripping some data out.
I'm looking at using ReadableMap as a workaround.
System:
OS: macOS 11.6
CPU: (8) x64 Apple M1
Memory: 20.20 MB / 16.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 14.0.0 - ~/.nvm/versions/node/v14.0.0/bin/node
Yarn: 1.22.10 - ~/.nvm/versions/node/v14.0.0/bin/yarn
npm: 6.14.4 - ~/.nvm/versions/node/v14.0.0/bin/npm
Watchman: Not Found
Managers:
CocoaPods: 1.10.1 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: iOS 15.0, DriverKit 20.4, macOS 11.3, tvOS 15.0, watchOS 8.0
Android SDK: Not Found
IDEs:
Android Studio: 4.1 AI-201.8743.12.41.7042882
Xcode: 13.0/13A233 - /usr/bin/xcodebuild
Languages:
Java: 15.0.2 - /usr/bin/javac
Python: 2.7.16 - /usr/bin/python
npmPackages:
@react-native-community/cli: Not Found
react: 16.13.1 => 16.13.1
react-native: ~0.63.4 => 0.63.4
react-native-macos: Not Found
npmGlobalPackages:
react-native: Not Found
(Use NPX, Expo, and react native modules)
The text was updated successfully, but these errors were encountered: