Re: [PATCH] Fix use of width uninitialized in graphemestep
[Thread Prev] | [Thread Next]
- Subject: Re: [PATCH] Fix use of width uninitialized in graphemestep
- From: "S. Gilles" <sgilles@xxxxxxxxxxxx>
- Reply-to: myrddin-dev@xxxxxxxxxxxxxx
- Date: Tue, 7 Nov 2017 01:37:48 -0500
- To: Ori Bernstein <ori@xxxxxxxxxxxxxx>
- Cc: myrddin-dev@xxxxxxxxxxxxxx
On 2017-11-06T22:11:43-0800, Ori Bernstein wrote: > On Tue, 7 Nov 2017 00:16:11 -0500, "S. Gilles" <sgilles@xxxxxxxxxxxx> wrote: > > > This would result in infinite loops in pretty much any caller. Also > > fix handling of \r, \n, \t, which need to form their own graphemes, > > but which aren't nicely marked as positive width by cellwidth. > > Well, that's another. The compiler shouldn't have let that pass. > > > + if (c == '\r' || c == '\n' || c == '\t') > > > I did some reading[1], and it might be easier to do it the correct > way than we assumed. There's a table for this data[2]. > > [1] http://unicode.org/reports/tr29/#Grapheme_Cluster_Boundaries > [2] http://www.unicode.org/Public/UCD/latest/ucd/auxiliary/GraphemeBreakProperty.txt > > I'm applying this because it fixes a fairly big bug, but it might > be nice to follow the spec here. Huh. I thought I'd looked into that and judged it impossible, but it looks like my concerns were actually over "tailored grapheme clusters", which could be ignored. Korean might be a problem, but I think it would be in any case. -- S. Gilles
Re: [PATCH 2/2 v2] Implement graphemestep | Ori Bernstein <ori@xxxxxxxxxxxxxx> |
[PATCH] Fix use of width uninitialized in graphemestep | "S. Gilles" <sgilles@xxxxxxxxxxxx> |
Re: [PATCH] Fix use of width uninitialized in graphemestep | Ori Bernstein <ori@xxxxxxxxxxxxxx> |
- Prev by Date: Re: [PATCH] Fix use of width uninitialized in graphemestep
- Next by Date: Re: RFC: comparable and hashable traits
- Previous by thread: Re: [PATCH] Fix use of width uninitialized in graphemestep
- Next by thread: IRC Client: Done and in use.
- Index(es):