A NOTE has been added to this issue. ====================================================================== https://www.austingroupbugs.net/view.php?id=1920 ====================================================================== Reported By: stephane Assigned To: ====================================================================== Project: 1003.1(2013)/Issue7+TC1 Issue ID: 1920 Category: Shell and Utilities Type: Omission Severity: Objection Priority: normal Status: New Name: Stephane Chazelas Organization: User Reference: Section: read utility, stdin section Page Number: 3321 Line Number: 112915 Interp Status: --- Final Accepted Text: ====================================================================== Date Submitted: 2025-04-21 07:16 UTC Last Modified: 2025-04-22 14:46 UTC ====================================================================== Summary: read -d '' on invalid text without -r and IFS= ======================================================================
---------------------------------------------------------------------- (0007140) geoffclare (manager) - 2025-04-22 14:46 https://www.austingroupbugs.net/view.php?id=1920#c7140 ---------------------------------------------------------------------- I can't see a problem here. Or if there is a problem, it is not as big as Stephane is claiming. All of the processing of the input is specified in terms of bytes, not characters, to allow for the fact that the input need not form valid characters. This was done because the input often contains pathnames. The wording does refer to characters in a few places, but only when referring to single-byte characters (including a delim character specified with -d, because if delim is not a single-byte character, the behaviour is unspecified) or to characters in IFS. Although IFS contains characters, XCU 2.6.5 says "The shell shall use the byte sequences that form the characters in the value of the IFS variable as delimiters", and "Note that the shell processes arbitrary bytes from the input fields; there is no requirement that those bytes form valid characters." As regards Stephane's suggested text at the end of https://www.austingroupbugs.net/view.php?id=1920#c7139, we definitely don't want to go back to requiring the input to be text under any circumstances (because of the pathname thing). Issue History Date Modified Username Field Change ====================================================================== 2025-04-21 07:16 stephane New Issue 2025-04-21 07:30 stephane Note Added: 0007139 2025-04-21 07:38 stephane Note Edited: 0007139 2025-04-22 14:46 geoffclare Note Added: 0007140 ======================================================================
