Re: [w3c/push-api] Should there be a UTF-8 health warning? (#335)

The problem here is that there is no actual mention of character encoding besides the `utf-8 decode`. Yes, the decode will succeed regardless of the encoding of _bytes_, but this interface can also be used for sending bytes. I would at least mention that failing to use UTF-8 will produce replacement characters or mojibake garbage. Perhaps:

> Note that textual content is expected to use the UTF-8 character encoding. Content using a different character encoding needs to be decoded from an `arrayBuffer()` or `blob()`.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/w3c/push-api/issues/335#issuecomment-1015551943
You are receiving this because you are subscribed to this thread.

Message ID: <w3c/push-api/issues/335/1015551943@github.com>

Received on Tuesday, 18 January 2022 15:56:36 UTC