1373
Pure evil (lemmy.blahaj.zone)
submitted 10 months ago by calebegg to c/programmerhumor@lemmy.ml
you are viewing a single comment's thread
view the rest of the comments
[-] IrateAnteater@sh.itjust.works 70 points 10 months ago

Why is it that whenever something is spitting out junk data, those specific characters are involved?

[-] Vent@lemm.ee 96 points 10 months ago

� is used to represent an invalid character, so it makes sense that it'd appear often when bad data is being rendered (or good data is being rendered improperly).

[-] ImplyingImplications@lemmy.ca 66 points 10 months ago

Everything is 0s and 1s to a computer. What a pattern of 0s and 1s encodes is decided by people--often arbitrarily. Over the years there have been attempts to standardize encodings but, for legacy reasons, older encodings are still valid.

The 0s and 1s that encode ' in UTF-8 (a standardized encoding) are the same 0s and 1s that encode ’ in CP-1252 (a legacy encoding).

The � symbol is shown when the 0s and 1s don't encode anything of meaning.

[-] JackbyDev@programming.dev 4 points 10 months ago

Right single quote (’) in UTF-8 (https://www.compart.com/en/unicode/U+2019) has the same bytes as ’ in cp1252 (which is more or less "ASCII" if we're doing ELI5). https://en.wikipedia.org/wiki/Windows-1252

Sometimes your keyboard or program's settings will use right single quote for apostrophes instead of a normal apostrophe. ' you might notice how this one is straight and not bent a certain way. This setting is often called smart quotes.

this post was submitted on 06 Sep 2024
1373 points (100.0% liked)

Programmer Humor

37389 readers
16 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 6 years ago
MODERATORS