correct value for LANG variable

Tim Robbins tjr at freebsd.org
Sat Jan 22 16:51:56 PST 2005


On Sat, Jan 22, 2005 at 06:29:29PM +0100, Bj?rn K?nig wrote:
> Michael Nottebrock schrieb:
> 
> >
> >Use tr [:lower:] [:upper:] instead.
> >
> I was wondering about a third-party script which always
> worked for years with Solaris. I just didn't realized that
> this issue concerns a difference between SysV and BSD.

The current behaviour of range expressions in tr was required by the
Single Unix Specification Version 2 (SUSv2). Version 3 loosened this
requirement by making these expressions "unspecified" in locales other
than "POSIX". This means you can't use tr with range expressions in any
script intending to be portable without first setting LANG to "POSIX".

For reference, the systems I know of that sort range expressions
according to the current locale are FreeBSD 5 (and later), AIX,
and Tru64. The systems I know of that don't sort are FreeBSD 4
(and earlier), GNU (coreutils), and NetBSD.


Tim


More information about the freebsd-stable mailing list