Opened 16 years ago

Closed 16 years ago

#2099 closed defect (fixed)

version check script should be run with LC_ALL=C LANGUAGE=C

Reported by: alexander@… Owned by: lfs-book@…
Priority: highest Milestone: 7.0
Component: Book Version: 6.3
Severity: normal Keywords:
Cc:

Description

The current version checking script uses the following to find the version of binutils:

echo -n "Binutils: "; ld --version | head -n1 | cut -d" " -f3-4

This is not locale-safe, as the field numbers in the translation may not match those in the original English message. This has already biten jhalfs user (on findutils, not binutils).

Change History (3)

comment:1 by bdubbs@…, 16 years ago

I don't know of any LANGUAGE environment setting, but there is a LANG setting.

LC_ALL overrides LANG, so I think only LC_ALL=C is needed as the second line of the script.

http://publib.boulder.ibm.com/infocenter/systems/index.jsp?topic=/com.ibm.aix.nls/doc/nlsgdrf/locale_env.htm

comment:2 by alexander@…, 16 years ago

Indeed, you are right. This quote from Glibc source (about the message catalog to use, intl/dcigettext.c) confirms your correction:

  /* The highest priority value is the `LANGUAGE' environment
     variable.  But we don't use the value if the currently selected
     locale is the C locale.  This is a GNU extension.  */

comment:3 by bdubbs@…, 16 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.