Anonymous | Login | 2025-01-16 19:27 UTC |
Main | My View | View Issues | Change Log | Docs |
Viewing Issue Simple Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||
ID | Category | Severity | Type | Date Submitted | Last Update | ||
0001562 | [Issue 8 drafts] Shell and Utilities | Editorial | Clarification Requested | 2022-02-13 00:28 | 2024-06-11 09:12 | ||
Reporter | calestyo | View Status | public | ||||
Assigned To | |||||||
Priority | normal | Resolution | Accepted As Marked | ||||
Status | Closed | Product Version | Draft 2.1 | ||||
Name | Christoph Anton Mitterer | ||||||
Organization | |||||||
User Reference | |||||||
Section | Utilities, printf | ||||||
Page Number | 3084 | ||||||
Line Number | 104239 | ||||||
Final Accepted Text | Note: 0005818 | ||||||
Summary | 0001562: printf utility: clarify what is (byte) string an what is character string | ||||||
Description |
3.375 String, defines: "A contiguous sequence of bytes terminated by and including the first null byte." i.e. a byte string, not - by itself - subject to the locale. The description of the printf utility, uses the phrase "string" in some cases without clearly telling whether character or byte string is meant. Line 104239, OPERANDS: > format > A string describing the format to use to write the remaining operands. See the > EXTENDED DESCRIPTION section. => At least when following line 104273... "The format operand shall be used as the format string described in XBD Chapter 5 (on page 101)", where it clearly says: "The format is a character string that contains three types of objects defined below" ... format should be a character string, and as such, it would be subject to LC_CTYPE?! => OTOH, the APPLICATION USAGE tells that it's modelled after the printf() function, which in turn uses a C-string as format string,... and if that would also apply to the printf utility, it would be a (byte) string and XBD Chapter 5's provisions would fully apply (which should then be explicitly mentioned). (See below, for an analogue example for why I think the difference matters.) > argument > The strings to be written to standard output, under the control of format. > See the EXTENDED DESCRIPTION section. Seems clearly a (byte) string, whose interpretation (byte, character) depends on the respective conversion specifier. It may further make sense, to explicitly clarify in line 104288, that string here is a "byte string", especially because in 104290 and following, it's laid out how characters are part of it. Consider e.g. some weird multibyte locale in which a character named A' is composed of bytes that include the binary representation of e.g. '\' (assuming some ASCII encodings for '\' and 'n')... I take as example for A' = 0xAA 0x5C A string: A'n ... that is 0xAA 0x5C 0x6E should probably be interpreted as: 0xAA \n and thus giving 0xAA 0x0A ... and not the character A' followed by n. Given that the whole section uses quite often the term "format string" (in the sense of character string)... it may make things more clear, to emphasise that this is a byte string. The same probably at line 104321. |
||||||
Desired Action |
See above. Clarify more explicitly, what is byte string, and what is character string, or whether that's unspecified. |
||||||
Tags | tc3-2008 | ||||||
Attached Files | |||||||
|
Relationships | ||||||
|
Issue History | |||
Date Modified | Username | Field | Change |
2022-02-13 00:28 | calestyo | New Issue | |
2022-02-13 00:28 | calestyo | Name | => Christoph Anton Mitterer |
2022-02-13 00:28 | calestyo | Section | => Utilities, printf |
2022-02-13 00:28 | calestyo | Page Number | => 3084 |
2022-02-13 00:28 | calestyo | Line Number | => 104239 |
2022-02-13 01:08 | Don Cragun | Note Added: 0005673 | |
2022-04-07 16:30 | geoffclare | Relationship added | related to 0001561 |
2022-04-08 14:48 | geoffclare | Note Added: 0005792 | |
2022-04-08 14:49 | geoffclare | Note Edited: 0005792 | |
2022-04-11 08:58 | geoffclare | Note Added: 0005793 | |
2022-04-15 02:55 | calestyo | Note Added: 0005806 | |
2022-04-22 15:18 | geoffclare | Note Added: 0005818 | |
2022-04-22 15:19 | geoffclare | Note Edited: 0005818 | |
2022-04-28 15:31 | geoffclare | Final Accepted Text | => Note: 0005818 |
2022-04-28 15:31 | geoffclare | Status | New => Resolved |
2022-04-28 15:31 | geoffclare | Resolution | Open => Accepted As Marked |
2022-04-28 15:32 | geoffclare | Tag Attached: tc3-2008 | |
2022-05-26 10:13 | geoffclare | Status | Resolved => Applied |
2024-06-11 09:12 | agadmin | Status | Applied => Closed |
Mantis 1.1.6[^] Copyright © 2000 - 2008 Mantis Group |