We had a weird encoding bug at work.
-
We had a weird encoding bug at work. Turns out the HiveMQ MQTT library uses ASCII when calling
PublishAsync(string topic, string payload)
, but UTF-8 when creating theMQTT5PublishMessage
directly and sending that withPublishAsync
.
Why???????? -
We had a weird encoding bug at work. Turns out the HiveMQ MQTT library uses ASCII when calling
PublishAsync(string topic, string payload)
, but UTF-8 when creating theMQTT5PublishMessage
directly and sending that withPublishAsync
.
Why????????@volpeon@icy.wyvern.rip sounds like a great library to me
-
We had a weird encoding bug at work. Turns out the HiveMQ MQTT library uses ASCII when calling
PublishAsync(string topic, string payload)
, but UTF-8 when creating theMQTT5PublishMessage
directly and sending that withPublishAsync
.
Why????????@volpeon@icy.wyvern.rip obviously to confuse everyone
-
We had a weird encoding bug at work. Turns out the HiveMQ MQTT library uses ASCII when calling
PublishAsync(string topic, string payload)
, but UTF-8 when creating theMQTT5PublishMessage
directly and sending that withPublishAsync
.
Why???????? -
@GarretSidzaka I inspected the code and IIRC PublishAsync(topic, payload) ultimately constructs a MQT5PublishMessage as well and then calls the other PublishAsync. The difference is that it explicitly uses an ASCII encoder, whereas when you construct a MQT5PublishMessage yourself it defaults to a UTF-8 encoder. :neofox_googly: