Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 19 Nov 2015 22:02:39 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-bugs@FreeBSD.org
Subject:   [Bug 204394] usr.bin/tr: ASCII collation passthrough doesn't work on Unicode-aware locales
Message-ID:  <bug-204394-8-BdmriaJixN@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-204394-8@https.bugs.freebsd.org/bugzilla/>
References:  <bug-204394-8@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=204394

Jan Beich <jbeich@FreeBSD.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |regression
            Summary|www/firefox: configure:     |usr.bin/tr: ASCII collation
                   |error:                      |passthrough doesn't work on
                   |--enable-chrome-format must |Unicode-aware locales
                   |be set to either jar, flat, |
                   |or omni                     |
              Flags|maintainer-feedback?(gecko@ |maintainer-feedback+
                   |FreeBSD.org)                |
           Assignee|gecko@FreeBSD.org           |freebsd-bugs@FreeBSD.org
            Version|Latest                      |11.0-CURRENT
            Product|Ports & Packages            |Base System
                 CC|                            |bapt@FreeBSD.org,
                   |                            |marino@FreeBSD.org
          Component|Individual Port(s)          |bin

--- Comment #5 from Jan Beich <jbeich@FreeBSD.org> ---
Cutting down configure I've found

  # NLS nuisances.
  # Only set these to C if already set.  These must not be set unconditionally
  # because not all systems understand e.g. LANG=C (notably SCO).
  # Fixing LC_MESSAGES prevents Solaris sh from translating var values in
`set'!
  # Non-C LC_CTYPE values break the ctype check.
  if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
  if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
  if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES;
fi
  if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;   
fi

which breaks tr(1) on a mixed locale (LANG unset)

  $ env -i LC_COLLATE=en_US.UTF-8 LC_CTYPE=C sh
  $ echo FooBar | tr A-Z a-z
  aq
  $ echo FooBar | tr '[:upper:]' '[:lower:]'
  foobar

GNU tr (coreutils) works fine but doesn't support UTF-8 at all.

-- 
You are receiving this mail because:
You are the assignee for the bug.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-204394-8-BdmriaJixN>