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 sending short/long Unicode strings #89

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

afedor
Copy link

@afedor afedor commented Jul 12, 2024

  • Convert to utf8 before writing string so string and string length match

- Convert to utf8 _before_ writing string so string and string length match
@WollZebra
Copy link
Collaborator

Nice finding. Looks good to me.
Did you find a unit test that checks what was written into the stream?
QDataStream &s

@afedor
Copy link
Author

afedor commented Nov 27, 2024

That's not very easy since this encoding is only used for some 'metadata', like routing keys and queue names. So if it's not encoded correctly, you end up just not receiving a message at all, since the routing key doesn't match. That's what my test checks

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

Successfully merging this pull request may close these issues.

2 participants