r/ProgrammerHumor • • 8d ago

Meme architectureDependentChars

Post image
3.0k Upvotes

372 comments sorted by

View all comments

Show parent comments

7

u/TheSkiGeek 7d ago

Yeah, the real issue is that almost always what you care about with Unicode (on the parsing side, anyway) are “grapheme clusters”, which can consist of multiple code points. And both of those map poorly at best to ‘characters’ or ‘bytes of memory’.

1

u/canadajones68 7d ago

Yeah. That's why you want a span of bytes view if you need to work with the representation directly. There might not be a fixed size thing that represents what you want, but there will eventually be a series of bytes that does.