Zulip Chat Archive
Stream: general
Topic: Users posting spaced-out code with funny characters in
Kevin Buzzard (Dec 04 2024 at 10:33):
I have noticed recently that users (perhaps only Windows users?) are posting code with spaces between every line and also with funny characters instead of spaces. The first two examples I saw were with (competent) users posting code directly to me in DMs but now I've seen an example in the wild here. If I "Copy code" and then paste into a local VS code then I get the following mess:
Can anyone diagnose what's going on?
Junyan Xu (Dec 04 2024 at 10:37):
Maybe Zulip's relative new pasting with formatting is to blame? I've also seen the extra blank lines when pasting into Obsidian, for example.
Markus Himmel (Dec 04 2024 at 10:43):
The yellow boxes are non-breaking spaces (UTF-8 c2 a0), and the double newlines are just line feeds (0a 0a). An internet search turns up https://github.com/microsoft/vscode/issues/88178, but I'm not sure if that's the same problem.
Yaël Dillies (Dec 04 2024 at 10:44):
Usually this happens when people post code outside of ``````. Is this the case for you here?
Markus Himmel (Dec 04 2024 at 10:44):
The comment "In recent releases, I'm finding single spaces are copied as spaces, but double spaces are copied as a non-breaking space and a space." from the linked issue definitely matches what we're observing.
Kevin Buzzard (Dec 04 2024 at 10:46):
Yaël Dillies said:
Usually this happens when people post code outside of ``````. Is this the case for you here?
Clicking on "View original message" in the example I linked to shows that the user correctly used ```
s.
Eric Wieser (Dec 04 2024 at 10:59):
I would guess this is also related to a Zulip change; as I understand it the clipboard can contain multiple versions of the copied data (e.g. rich and plain text), and perhaps Zulip is using the former more often now.
Last updated: May 02 2025 at 03:31 UTC