Closed sip2thefuture closed 1 month ago
I'd be interested to add a test case, what sort of data being sent would illustrate the problem? I currently have test cases for utf8 encoded things like emojis and those do work.
I don't have test data right now, they might work, but utf8_strlen is not the correct way to count the byteSize (you do the same on the wire-protocol side).
https://github.com/drachtio/drachtio-srf/blob/main/lib/wire-protocol.js#L271
std::size is the equivalent of what you did there, not utf8_streln.
Leave it another bit as it needs to be in pair with drachtio-srf changes
@sip2thefuture I've pushed the changes to drachtio-srf in version 0.5.0 of same, could you update the package.json in the test folder to refer to same?
@davehorton done!
my bad @sip2thefuture, actually the version needed is 5.0.0. Could you push that one last change?
Should be fine now
I'm releasing this in drachtio-server 0.9.0 and it should be partnered with drachtio-srf 5.0.0 or higher. Thanks for the help!
Basically, utf8_strlen is only useful if you want to display the character, but has no meaning when trying to access the data.