Remix.run Logo
matt_kantor 3 days ago

> except things that do require you to assume it's valid UTF-8

That's the point.

maxdamantus 3 days ago | parent [-]

But no one has demonstrated an actual operation that requires valid UTF-8. The reasoning is always circular: "I require valid UTF-8 because someone else requires valid UTF-8".

Eventually there should be an underlying operation which can only work on valid UTF-8, but that doesn't exist. UTF-8 was designed such that invalid data can be detected and handled, without affecting the meaning of valid subsequences in the same string.