Strange characters when copying curly quotes from prosemirror on Safari to macOS Pages

You need:

  1. macOS Pages
  2. Safari

Steps to reproduce:

  1. Open https://prosemirror.net/ on Safari 13.1
  2. Input some text with curly quotes: “1”
  3. Copy all text into macOS Pages
  4. It’s turned into: “1â€

Seems like some encoding issue, and I can’t reproduce the problem on Word for macOS or other editor.

I checked https://github.com/ProseMirror/prosemirror-view/blob/3a8bed5b73ee8db94b34242b16b2098bff9a6707/src/input.js#L501 in devtools, and dom.innerHTML and text are correct.

Definitely an encoding issue, but if the quotes look like quotes in ProseMirror, I don’t think it can do much about this (JavaScript can only write its native UTF16 strings to the clipboard, how those are interpreted in other applications is outside of its control)

Make sense, thank you for your quick response!