Skip to content
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

Fix byte-encoding of Strings / Unicode safety #1

Open
msakrejda opened this issue Nov 28, 2009 · 1 comment
Open

Fix byte-encoding of Strings / Unicode safety #1

msakrejda opened this issue Nov 28, 2009 · 1 comment

Comments

@msakrejda
Copy link
Owner

Currently, the {read,write}UTF{,Bytes} methods are used. This may not always be sane.

@msakrejda
Copy link
Owner Author

For instance, I think length calculations in message encoding are almost certainly bogus, since they're occuring in terms of the number of characters, not the number of bytes.

A possible workaround here is to write the string out to a byte array and see how many bytes we wrote, but this seems rather silly (and hopelessly inefficient). Nevertheless, there may not be a better alternative at this time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant