diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2014-05-06 18:38:09 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2014-05-06 18:38:46 -0700 |
commit | 3974c0932df8281f4e0fa34c36c07a9d72f1155d (patch) | |
tree | 11ac3df3d1ed48724732d1cf747ae61d05236c3c /doc | |
parent | 8840a00cd79b8beae72b1a0ec6b9e64912633c13 (diff) | |
download | coreutils-3974c0932df8281f4e0fa34c36c07a9d72f1155d.tar.xz |
dd: fix conv=ascii, conv=ebcdic, conv=ibm to match POSIX
Problem reported by Don Baggett in <http:/bugs.gnu.org/17422>.
* NEWS:
* doc/coreutils.texi (dd invocation): Document this.
* src/dd.c (conversions): conv=ascii implies conv=unblock.
conv=ebcdic and conv=ibm imply conv=block.
(ascii_to_ebcdic, ebcdic_to_ascii): Correct to match
POSIX 1003.1-2013.
* tests/dd/ascii.sh: New file.
* tests/local.mk (all_tests): Add it.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/coreutils.texi | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/doc/coreutils.texi b/doc/coreutils.texi index a949ffcac..789cd68e5 100644 --- a/doc/coreutils.texi +++ b/doc/coreutils.texi @@ -8621,21 +8621,26 @@ Conversions: Convert EBCDIC to ASCII, using the conversion table specified by POSIX@. This provides a 1:1 translation for all 256 bytes. +This option implies @samp{conv=unblock}; input is converted to +ASCII before trailing spaces are deleted. @item ebcdic @opindex ebcdic@r{, converting to} Convert ASCII to EBCDIC@. This is the inverse of the @samp{ascii} conversion. +This option implies @samp{conv=block}; trailing spaces are added +before being converted to EBCDIC@. @item ibm @opindex alternate ebcdic@r{, converting to} -Convert ASCII to alternate EBCDIC, -using the alternate conversion table specified by POSIX@. +This acts like @samp{conv=ebcdic}, except it +uses the alternate conversion table specified by POSIX@. This is not a 1:1 translation, but reflects common historical practice for @samp{~}, @samp{[}, and @samp{]}. The @samp{ascii}, @samp{ebcdic}, and @samp{ibm} conversions are -mutually exclusive. +mutually exclusive. If you use any of these options, you should also +use the @samp{cbs=} option. @item block @opindex block @r{(space-padding)} |