cshannon commented on PR #1284: URL: https://github.com/apache/activemq/pull/1284#issuecomment-2313738960
@azotcsit and @mattrpav and @tabish121 - So I'm starting to think, what if we are thinking about this backwards? The entire ecosystem around ActiveMQ has been modified when encoding strings as UTF-8, including the C++ and NMS and Java clients and broker to use the same modified UTF-8 encoding. The encoding/decoding is not standard UTF-8 but is a modified version of course because it only uses 3 bytes and doesn't work correctly with 4 byte encoding the "standard" UTF-8 way. But what if that is ok? Everything works just fine with the modified encoding as long as you use the same encoding logic and decoding logic and don't try and mix it like STOMP does (ie don't use the jdk encoder that uses 4 bytes). I verified this by testing the provided example with the emojis. It works just fine with the current encoder and decoder. So you could actually argue that the bug here is not with the modified encoding/decoding itself as there's nothing saying we can't do it that way. Going back to it being backwards...what if the bug is actually in STOMP? We've been assuming the bug is the encoder on the OpenWire side but in reality the more I think about it the ACTUAL bug seems to be that STOMP uses the JDK encoder/decoder and not the modified version. I think the MUCH simpler solution here is we leave everything as it is since it works and we update the STOMP protocol that uses the JDK 8 and normal UTF-8 encoding to instead using the modified encoding utility which should solve the entire issue. Unless the modified encoder/decoder would actually result in not being able to decode correctly (which seems to not be the case as long as they match) I think it's fine to keep it and just fix STOMP. Thoughts? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: gitbox-unsubscr...@activemq.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: gitbox-unsubscr...@activemq.apache.org For additional commands, e-mail: gitbox-h...@activemq.apache.org For further information, visit: https://activemq.apache.org/contact