[illumos-Developer] tr webrev

Garrett D'Amore garrett at nexenta.com
Sat Sep 4 17:39:52 PDT 2010


On Sun, 2010-09-05 at 02:29 +0200, Joerg Schilling wrote:
> "Garrett D'Amore" <garrett at damore.org> wrote:
> 
> > So, we're faced with a choice.
> >
> > The NetBSD tr sounds like it works correctly in some cases that our
> > current FreeBSD does not.
> 
> Could you please list these cases?

Please see bug 121.  I've reproduced some of this unusual behavior
myself as well.  There's no doubt that our FreeBSD based tr is
defective.  What I don't know is whether the defect is trivial to fix or
not.

> 
> > But from reading the review, NetBSD tr lacks support for some things
> > that FreeBSD supposedly has.  Chiefly support for internationalization
> > (which is important when dealing with multibyte locales or character
> > sets that have different interpretations for character classes), and
> > support for -C.
> 
> Implementing -C for multibyte character classes is not trivial.

Agreed.  Although FreeBSD tr has it, and we have some private functions
in libc to help out.

> 
> My general impression for BetBSD vs. FreeBSD is that FreeBSD usually is more 
> modern and more feature rich.

ITYM NetBSD.  Yes, FreeBSD usually is more.  Although this case was
surprising, since I think the Citrus implementation in NetBSD is a more
complete i18n solution.  So its not entirely black and white.

> 
> I would first like to understand the constraints (e.g. which problems are 
> expected from which implementation).

As much as possible, compatibility with Sun tr (esp. /usr/xpg4/bin/tr)
and POSIX.

	- Garrett




More information about the Developer mailing list