3 ms·
> then either way the software is incorrect - those are both obviously 6 letter strings. What I wanted to get at is that in Unicode, I have a chance to count l
by lolc 6y ago
> then either way the software is incorrect - those are both obviously 6 letter strings.
What I wanted to get at is that in Unicode, I have a chance to count letters to some useful degree. Why should I consider starting at byte-arrays?
> there are plenty of perfectly valid Unicode strings for which this question doesn't have a meaningful answer.
I don't get it. Why does the existence of degenerate cases invalidate the usefulness of a Unicode lib? If I want to know how many letters are in a string, I can probably get a useful answer from a Unicode lib. Not for all edge-cases, but I can decide on the trade-offs. If I have a byte-array, I start at a lower level.
- a1369209993 6y ago> What I wanted to get at is that in Unicode, I have a chance to count letters to some useful degree. You do not. You merely happen to get the right answer by coincidence in some cases, same as bytes-that-probably-are(n't)-ASCII. To throw your own words back at you: "Åström" is 6 code points in Unicode "Åström" is 8 code points in Unicode If your software tells the user that one is six and the other is 8 letters long, it is not "less correct". It is incorrect. Further, if searching for "Åström" won't find "Åström", your software is less useful than it could be if it knew text. (And it's sad how often software gets this wrong.)