Eigenstate: myrddin-dev mailing list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Fix use of width uninitialized in graphemestep


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

References:
Re: [PATCH 2/2 v2] Implement graphemestepOri Bernstein <ori@xxxxxxxxxxxxxx>
[PATCH] Fix use of width uninitialized in graphemestep"S. Gilles" <sgilles@xxxxxxxxxxxx>
Re: [PATCH] Fix use of width uninitialized in graphemestepOri Bernstein <ori@xxxxxxxxxxxxxx>