Jeroen Frijters wrote:
> > Should I commit this? Or should it be bitshifting and bitmasking?
>
> Please do. The current code is broken, so it is clearly an improvement.
> Once the code is correct we can argue about micro optimizations ;-)
OK, here's the ChangeLog entry. Thanks for the explanation
Chris Burdess wrote:
> > > > I also have a mild preference for the bit-shifting and masking
> > > > computation, but this is more minor.
> > >
> > > The problem is that the bit-shifting method produces the
> wrong result.
> >
> > In this case they both produce the same result. I think the
> pro
Jeroen Frijters wrote:
> > > I think it is better to use the named constants instead of
> > the values.
> >
> > Fair enough, but what about the casting: doesn't that make it
> > less efficient?
>
> No, it's a no-op (and not even needed in the source).
OK
> > > I also have a mild preference fo
Chris Burdess wrote:
> Tom Tromey wrote:
> > Chris> Please comment.
> >
> > Chris> -dst[dstIndex + 1] = (char) ((codePoint & 0x3ff)
> > Chris> -+ (int)
> MIN_LOW_SURROGATE );
> > Chris> -dst[dstIndex] = (char) ((codePoint >> 10) +
> (int) MIN_H