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

Any help, advice appreciated (Unicode / UTF-8)?? #3032

Closed
GerritS76 opened this issue Apr 6, 2024 · 0 comments
Closed

Any help, advice appreciated (Unicode / UTF-8)?? #3032

GerritS76 opened this issue Apr 6, 2024 · 0 comments

Comments

@GerritS76
Copy link

GerritS76 commented Apr 6, 2024

I am using Mosquitto 2.0.18 with Meshtastic, nothing wrong with that. But as soon as I send ceretain words or sentences strange things happen. Between Mosquitto and Meshtastic devices messages are sent in text (UTF-8).

The following occurs.
When sending UTF-8 like text, it shows \u0000 instead of certain letters. Some example words:

Geïsoleerd (isolated) with a " on top of the i. No matter how I send it to Mosquitto, it's always shown as \u0000. Same happens when using other letters like éäóö etc... (looks like UTF-8 is all converted into Unicode(?)).

An example:
mosquitto_pub -h localhost -u {user} -P {pass} -t 'msh/3300-3329/2/json/mqtt/!{hidden}' -m '{"channel": 0,"from":3663497172,"type":"sendtext","payload":"Weer even één testje..."}'

Shows:

{"channel":0,"from":{hidden},"hops_away":0,"id":1749253767,"payload":{"text":"Weer even \u0000\u0000\u0000\u0000n testje..."},"sender":"{hidden}","timestamp":1712426348,"to":{hidden},"type":"text"}

Both via MQTT Explorer as well when using mosquitto_sub or all sorts of other methods like Python PIP modules, PHP (pear) modules etc. As i am out of idea's i wonder if there's a way to get \u0000 converted into normal UTF-8 output?

It sent the correct way to Mosquitto (MQTT), the mqtt/!{hidden} contains the payload without \u0000 but it looks like Mosquitto converts UTF-8 into Unicode.

Does anyone know how to get this resolved so characters are shown the correct way?

@GerritS76 GerritS76 changed the title Any help, advice appriciated (Unicode / UTF-8)?? Any help, advice appreciated (Unicode / UTF-8)?? Apr 6, 2024
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