Viewing Issue Simple Details
[ Jump to Notes ]
|
[ Issue History ]
[ Print ]
|
ID |
Category |
Severity |
Type |
Date Submitted |
Last Update |
0001687 |
[Issue 8 drafts] Base Definitions and Headers |
Objection |
Clarification Requested |
2023-05-03 10:30 |
2024-06-11 09:12 |
|
Reporter |
geoffclare |
View Status |
public |
|
Assigned To |
|
Priority |
normal |
Resolution |
Accepted |
|
Status |
Closed |
|
Product Version |
Draft 3 |
|
Name |
Geoff Clare |
Organization |
The Open Group |
User Reference |
|
Section |
5 File Format Notation |
Page Number |
115 |
Line Number |
3632 |
Final Accepted Text |
|
|
Summary |
0001687: Mismatch between blanks in file formats and default IFS |
Description |
In the resolution of bug 0001532 the stty example code for restoring the terminal size uses awk because the stty utility is allowed to include blanks from the current locale (not just blank from the portable character set) around the numeric fields. It was mentioned in Note: 0005661 that if we change XBD chapter 5 so that it allows implementations to add blanks only from the portable character set, then the example code could be changed back to using shell field splitting instead of using awk.
I believe the reason for allowing blanks around numeric fields was because of implementation differences noted during work on the original POSIX.2 drafts, such as the output of "wc -l" including leading blanks on some systems but not others. These differences at the time would only have involved space and tab characters, no other blanks, so there was no reason to allow other blanks in the original POSIX.2-1992 standard.
There are likely a large number of applications that expect to be able to use the default IFS to do field splitting on such output, and at the moment this is not guaranteed to work (in locales other than C and POSIX). We should change that.
For consistency, the other use of <blank> in XBD chapter 5 should change to match.
|
Desired Action |
On page 113 line 3543 section 5, change:' ' (An empty character position.) Represents one or more <blank> characters. to:' ' (An empty character position.) Represents one or more <blank> characters from the portable character set.
On page 115 line 3632 section 5, change:with <blank> characters to:with <blank> characters from the portable character set
On page 3379 line 115321 section stty, change:stty size | awk '{printf "stty rows %d cols %d", $1, $2}' to:printf "stty rows %d cols %d" $(stty size)
|
Tags |
applied_after_i8d3, issue8 |
|
Attached Files |
|
|