Email List: Xaustin-review-lX
[All Lists]

Defect in XCU locale

To: yyyyyyyyyyyyyyy@xxxxxxxxxxxxx
Subject: Defect in XCU locale
From: yy@xxxxxxxxxxx
Date: Thu, 5 Feb 2004 11:19:42 GMT
        Defect report from : Ruslan Ermilov , FreeBSD

(Please direct followup comments direct to yyyyyyyyyyyyyy@xxxxxxxxxxxxx)

@ page 0 line 0 section locale comment {1}

Problem:

Edition of Specification (Year): 2003

Defect code :  3. Clarification required

There's an unclarity in the STDOUT section of the "setlocale" utility:

http://www.opengroup.org/onlinepubs/007904975/utilities/locale.html

Here's the relevant text:

If locale is invoked without any options or operands, the names and values of 
the LANG and LC_* environment variables described in this volume of IEEE Std 
1003.1-2001 shall be written to the standard output, one variable per line, 
with LANG first, and each line using the following format. Only those variables 
set in the environment and not overridden by LC_ALL shall be written using this 
format:

"%s=%s\n", <variable_name>, <value>

The names of those LC_* variables associated with locale categories defined in 
this volume of IEEE Std 1003.1-2001 that are not set in the environment or are 
overridden by LC_ALL shall be written in the following format:

"%s=\"%s\"\n", <variable_name>, <implied value>

It is unclear should the value of LANG be output if it's not set in the 
environment, or if both LANG and LC_ALL are set in the environment, and it's 
unclear which format should be used to output LANG.

Action:

After some research on different operating systems, I think the intent is to 
always output the value of the LANG variable (even if unset), regardless of 
whether LC_ALL is set or not, using the first format.

I suggest to change the text as follows:

If locale is invoked without any options or operands, the names and values of 
the LANG and LC_* environment variables described in this volume of IEEE Std 
1003.1-2001 shall be written to the standard output, one variable per line, 
with LANG first, and each line using the following format.

The LANG variable, and only those LC_* variables set in the environment and not 
overridden by LC_ALL shall be written using this format:

"%s=%s\n", <variable_name>, <value>

If LANG is not set, it shall be written as:

"LANG=\n"

The names of those LC_* variables associated with locale categories defined in 
this volume of IEEE Std 1003.1-2001 that are not set in the environment or are 
overridden by LC_ALL shall be written in the following format:

"%s=\"%s\"\n", <variable_name>, <implied value>

<Prev in Thread] Current Thread [Next in Thread>