From 6b1f72fec99178e1598a2d5734122be829575812 Mon Sep 17 00:00:00 2001 From: binwiederhier Date: Fri, 21 Apr 2023 20:52:17 -0400 Subject: [PATCH] Docs --- docs/publish.md | 12 ++++++++++++ docs/releases.md | 1 + 2 files changed, 13 insertions(+) diff --git a/docs/publish.md b/docs/publish.md index dabe17c..301094b 100644 --- a/docs/publish.md +++ b/docs/publish.md @@ -391,6 +391,12 @@ you can set the `X-Title` header (or any of its aliases: `Title`, `ti`, or `t`).
Detail view of notification with title
+!!! info + ntfy supports UTF-8 in HTTP headers, but [not every library or programming language does](https://www.jmix.io/blog/utf-8-in-http-headers/). + If non-ASCII characters are causing issues for you in the title (i.e. you're seeing `?` symbols), you may also encode the `X-Title` or `X-Message` + header as [RFC 2047](https://datatracker.ietf.org/doc/html/rfc2047#section-2), e.g. `=?UTF-8?B?8J+HqfCfh6o=?=` ([base64](https://en.wikipedia.org/wiki/Base64)), + or `=?UTF-8?Q?=C3=84pfel?=` ([quoted-printable](https://en.wikipedia.org/wiki/Quoted-printable)). + ## Message priority _Supported on:_ :material-android: :material-apple: :material-firefox: @@ -3322,6 +3328,12 @@ The following is a list of all parameters that can be passed when publishing a m when used in **HTTP headers**, and must be **lowercase** when used as **query parameters in the URL**. They are listed in the table in their canonical form. +!!! info + ntfy supports UTF-8 in HTTP headers, but [not every library or programming language does](https://www.jmix.io/blog/utf-8-in-http-headers/). + If non-ASCII characters are causing issues for you in the title (i.e. you're seeing `?` symbols), you may also encode the `X-Title` or `X-Message` + header as [RFC 2047](https://datatracker.ietf.org/doc/html/rfc2047#section-2), e.g. `=?UTF-8?B?8J+HqfCfh6o=?=` ([base64](https://en.wikipedia.org/wiki/Base64)), + or `=?UTF-8?Q?=C3=84pfel?=` ([quoted-printable](https://en.wikipedia.org/wiki/Quoted-printable)). + | Parameter | Aliases | Description | |-----------------|--------------------------------------------|-----------------------------------------------------------------------------------------------| | `X-Message` | `Message`, `m` | Main body of the message as shown in the notification | diff --git a/docs/releases.md b/docs/releases.md index 4ef9902..02343d1 100644 --- a/docs/releases.md +++ b/docs/releases.md @@ -1170,6 +1170,7 @@ and the [ntfy Android app](https://github.com/binwiederhier/ntfy-android/release * [ntfy CLI](subscribe/cli.md) (`ntfy publish` and `ntfy subscribe` only) can now be installed via Homebrew (thanks to [@Moulick](https://github.com/Moulick)) * Added `v1/stats` endpoint to expose messages stats (no ticket) +* Support [RFC 2047](https://datatracker.ietf.org/doc/html/rfc2047#section-2) encoded headers (no ticket, honorable mention to [mqttwarn](https://github.com/jpmens/mqttwarn/pull/638) and [@amotl](https://github.com/amotl)) **Bug fixes + maintenance:**