[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
dd 4.1 EBCDIC conversion dialect
From: |
Andrew M. Vick |
Subject: |
dd 4.1 EBCDIC conversion dialect |
Date: |
Tue, 31 Aug 2004 08:46:48 -0500 |
User-agent: |
Mozilla Thunderbird 1.5.0.4h (Windows/20040626) |
Bug: the dd man page does not say which EBCDIC dialect the GNU version of dd
uses.
Feature request: an option for the conv= argument to dd that sets the dialect.
/usr/local/bin/dd --ver
dd (fileutils) 4.1
Written by Paul Rubin, David MacKenzie, and Stuart Kemp.
Copyright (C) 2001 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
By my research, the GNU dd supports the HP dialect. Another version of dd we
have on our system (from SCO 5.0.6, no version information) supports the AT&T
dialect. The differences illustrated are as follows:
#The SCO dd
perl -e 'for $i (0 .. 0xFF) { print chr $i }' | /bin/dd conv=ascii | od -t x1 -A n | tr " "
"\n" > out1.txt
#The GNU dd
perl -e 'for $i (0 .. 0xFF) { print chr $i }' | /usr/local/bin/dd conv=ascii | od -t x1 -A n | tr
" " "\n" > out2.txt
#The control group
perl -e 'for $i (0 .. 0xFF) { print chr $i }' | od -t x1 -A n | tr " " "\n" >
ebcdic.txt
diff out1.txt out2.txt
In hexadecimal, ascii -> ebcdic(AT&T)/ebcdic(HP):
4a -> d5/5b /'['
4f -> 7c/21 '|'/'!'
5a -> 21/5d '!'/']'
5f -> 7e/5e '~'/'^'
6a -> cb/7c /'|'
9a -> 5e/cb '^'/
a1 -> e5/7e /'~'
ad -> 5b/d5 '['/
bd -> 5d/e5 '!'/
Notes three dialects of EBCDIC:
http://www.robelle.com/library/smugbook/ebcdic.html
Notes 13 characters that change between dialects:
http://search.cpan.org/~nwclark/perl-5.8.5/pod/perlebcdic.pod#13_variant_characters
The addition of this feature would allow us to migrate our existing scripts
and make it far easier for us to migrate from SCO OpenServer to Linux.
-Andrew Vick
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- dd 4.1 EBCDIC conversion dialect,
Andrew M. Vick <=