A NOTE has been added to this issue. ====================================================================== https://www.austingroupbugs.net/view.php?id=1959 ====================================================================== Reported By: collinfunk Assigned To: ====================================================================== Project: 1003.1(2024)/Issue8 Issue ID: 1959 Category: Shell and Utilities Tags: tc1-2024 Type: Clarification Requested Severity: Editorial Priority: normal Status: Interpretation Required Name: Organization: GNU User Reference: Section: XCU dd Page Number: 2778 Line Number: 91990 - 91996 Interp Status: Proposed Final Accepted Text: https://www.austingroupbugs.net/view.php?id=1959#c7335 Resolution: Accepted As Marked Fixed in Version: ====================================================================== Date Submitted: 2025-11-13 23:13 UTC Last Modified: 2026-01-22 16:53 UTC ====================================================================== Summary: dd conv=lcase and conv=ucase should only translate single byte locales ======================================================================
---------------------------------------------------------------------- (0007365) geoffclare (manager) - 2026-01-22 16:53 https://www.austingroupbugs.net/view.php?id=1959#c7365 ---------------------------------------------------------------------- Interpretation response ------------------------ The standard states that conv=lcase and conv=ucase map characters as specified by LC_CTYPE, and conforming implementations must conform to this. However, concerns have been raised about this which are being referred to the sponsor. Rationale: ------------- Mapping multibyte characters would cause problems for block sizes and across block boundaries and is not current implementation practice. Notes to the Editor (not part of this interpretation): ------------------------------------------------------- On page 2778 line 91992,91996 section dd (lcase,ucase), after: <blockquote>Characters for which no mapping is specified shall not be modified by this conversion.</blockquote> add a sentence: <blockquote>If a character to be mapped or a character resulting from the mapping is not a single-byte character, the behavior is unspecified.</blockquote> After page 2778 line 92010 section dd (conv=value) add a paragraph after the list: <blockquote>If the <b>ucase</b> or <b>lcase</b> conversion is used together with <b>ascii</b>, <b>ebcdic</b>, or <b>ibm</b>, the behavior is unspecified.</blockquote> After page 2783 line 92100 section dd (APPLICATION USAGE) add: <blockquote>Since the conversion from upper to lower or vice-versa is unspecified if the character to be mapped or a character resulting from the mapping is not a single-byte character, or if converting to ASCII or EBCDIC and attempting to change case, it is recommended to use <i>tr</i> to perform such conversions.</blockquote> On page 2783 line 92110 section dd (EXAMPLES), change: <blockquote><pre>dd if=/dev/tape of=x ibs=800 cbs=80 conv=ascii,lcase</pre></blockquote> to: <blockquote><pre>dd if=/dev/tape ibs=800 cbs=80 conv=ascii | LC_ALL=C tr '[:upper:]' '[:lower:]' > x</pre> The following command should not be used for this purpose as its behavior is unspecified: <pre>dd if=/dev/tape of=x ibs=800 cbs=80 conv=ascii,lcase</pre></blockquote> After Page 2783 line 92100 (Application Usage) add a new paragraph: <blockquote>Applications that need to convert between ASCII (ISO/IEC 646:1991 US) and some variant of EBCDIC should check to see if the implementation supports such conversion under <i>iconv</i> rather than using <i>dd</i>.</blockquote> Issue History Date Modified Username Field Change ====================================================================== 2025-11-13 23:13 collinfunk New Issue 2025-12-11 17:17 geoffclare Note Added: 0007335 2025-12-11 17:18 geoffclare Status New => Interpretation Required 2025-12-11 17:18 geoffclare Resolution Open => Accepted As Marked 2025-12-11 17:18 geoffclare Name Your Name Here => 2025-12-11 17:18 geoffclare Interp Status => Pending 2025-12-11 17:18 geoffclare Final Accepted Text => https://www.austingroupbugs.net/view.php?id=1959#c7335 2025-12-11 17:19 geoffclare Tag Attached: tc1-2024 2025-12-15 06:55 ajosey Interp Status Pending => Proposed 2025-12-15 06:55 ajosey Note Added: 0007338 2025-12-16 07:16 stephane Note Added: 0007340 2025-12-16 07:39 stephane Note Added: 0007341 2025-12-16 07:52 stephane Note Added: 0007342 2025-12-16 15:11 geoffclare Note Added: 0007344 2025-12-16 19:36 stephane Note Added: 0007345 2026-01-22 16:53 geoffclare Note Added: 0007365 ======================================================================
