-
Notifications
You must be signed in to change notification settings - Fork 123
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Injection.invert[String, Array[Byte]](Array[Byte](1, 2, 3, -1, -2, -127)) produces a string that cannot be inverted back #199
Comments
I think we need to validate that the byte string is valid UTF-8. It seems Java does not by default. That is really surprising. Why String does not throw an exception is really beyond me here. |
One way to fix this is discussed here
Don't depend on an encoding. Before the transformation, convert to characters arrays. |
Thats not going to be correct for characters which take more than one byte though is it? |
Java lets you report failures in other ways. |
@mosesn that looks like the way to go. |
The text was updated successfully, but these errors were encountered: