[GH-ISSUE #3] UTF8 #1

Closed
opened 2026-05-07 00:17:41 +02:00 by BreizhHardware · 8 comments

Originally created by @manson on GitHub (Nov 10, 2021).
Original GitHub issue: https://github.com/binwiederhier/ntfy/issues/3

Is it possible to process utf-8 encoding? Say, I've sent russian strings and gets bad symbols. Take a look at ntfy.sh/manson_alerts channeln you'll see it.

Originally created by @manson on GitHub (Nov 10, 2021). Original GitHub issue: https://github.com/binwiederhier/ntfy/issues/3 Is it possible to process utf-8 encoding? Say, I've sent russian strings and gets bad symbols. Take a look at [ntfy.sh/manson_alerts ](https://ntfy.sh/manson_alerts) channeln you'll see it.
Author
Owner

@binwiederhier commented on GitHub (Nov 10, 2021):

UTF-8 and even emojis are supported so I'm a little confused how that happened. Can you tell me what command you ran exactly, and what terminal and OS?

<!-- gh-comment-id:965015925 --> @binwiederhier commented on GitHub (Nov 10, 2021): UTF-8 and even emojis are supported so I'm a little confused how that happened. Can you tell me what command you ran exactly, and what terminal and OS?
Author
Owner

@manson commented on GitHub (Nov 10, 2021):

You're right. Under linux it works fine but failed as said above under windows 10 terminal

<!-- gh-comment-id:965106402 --> @manson commented on GitHub (Nov 10, 2021): You're right. Under linux it works fine but failed as said above under windows 10 terminal
Author
Owner

@binwiederhier commented on GitHub (Nov 10, 2021):

@manson Can you tell me the exact command you ran under the Windows 10 terminal? If I can reproduce I'm sure I'll be able to help you out or fix it.

<!-- gh-comment-id:965162155 --> @binwiederhier commented on GitHub (Nov 10, 2021): @manson Can you tell me the exact command you ran under the Windows 10 terminal? If I can reproduce I'm sure I'll be able to help you out or fix it.
Author
Owner

@manson commented on GitHub (Nov 10, 2021):

@binwiederhier This is command from example, I've just changed the message.
curl -d "проверка" ntfy.sh/manson_alerts
Exactly this command later I've copied into the my remote linux box bash terminal and it sent message as it should.
BTW, under windows it results in terminal with:
{"id":"vEWbgB6vQv","time":1636552487,"event":"message","topic":"manson_alerts","message":"\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd"}

<!-- gh-comment-id:965196187 --> @manson commented on GitHub (Nov 10, 2021): @binwiederhier This is command from example, I've just changed the message. curl -d "проверка" ntfy.sh/manson_alerts Exactly this command later I've copied into the my remote linux box bash terminal and it sent message as it should. BTW, under windows it results in terminal with: {"id":"vEWbgB6vQv","time":1636552487,"event":"message","topic":"manson_alerts","message":"\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd"}
Author
Owner

@binwiederhier commented on GitHub (Nov 10, 2021):

@manson So I will eventually try to replicate this on Windows, but I can only do that after work likely.

In the meantime, here are my initial thoughts:

  • I have had trouble with certain emojis when combining them with curl -d, e.g. curl -d "⚠️ Warning" ntfy.sh/mytopic does not work, but echo -en "⚠️ Warning" | curl -T- ntfy.sh/mytopic does. So it could be a "curl issue"
  • I am also wondering if it could be the Terminal encoding in Windows. If that's not UTF-8 then you may get garbled text like that. I don't know how to check that on Windows, but that could be a good starting point for you.
<!-- gh-comment-id:965209850 --> @binwiederhier commented on GitHub (Nov 10, 2021): @manson So I will eventually try to replicate this on Windows, but I can only do that after work likely. In the meantime, here are my initial thoughts: * I have had trouble with certain emojis when combining them with `curl -d`, e.g. `curl -d "⚠️ Warning" ntfy.sh/mytopic` does not work, but `echo -en "⚠️ Warning" | curl -T- ntfy.sh/mytopic` does. So it could be a "curl issue" * I am also wondering if it could be the Terminal encoding in Windows. If that's not UTF-8 then you may get garbled text like that. I don't know how to check that on Windows, but that could be a good starting point for you.
Author
Owner

@manson commented on GitHub (Nov 10, 2021):

@binwiederhier thank you. Actually I dont care about windows - I just have temporary work here, but mostly work under linux so its ok for me

<!-- gh-comment-id:965321511 --> @manson commented on GitHub (Nov 10, 2021): @binwiederhier thank you. Actually I dont care about windows - I just have temporary work here, but mostly work under linux so its ok for me
Author
Owner

@binwiederhier commented on GitHub (Nov 10, 2021):

I'll keep the ticket open then for now. I may get to it.

<!-- gh-comment-id:965397740 --> @binwiederhier commented on GitHub (Nov 10, 2021): I'll keep the ticket open then for now. I may get to it.
Author
Owner

@binwiederhier commented on GitHub (Nov 18, 2021):

Please reopen if there are more Windows UTF-8 issues

<!-- gh-comment-id:972413498 --> @binwiederhier commented on GitHub (Nov 18, 2021): Please reopen if there are more Windows UTF-8 issues
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ntfy#1
No description provided.