Re: EBCDIC - ASCII

2001-02-12 Thread Aled Morris

On Thu, 1 Feb 2001, Warner Losh wrote:

Even the name (dd) comes from IBM's control language (JSYS?).

I don't disagree, but someone once told me the name came from what
it does "Convert and Copy a file" - see dd(1) -  but "cc" was already
taken...

Aled




To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: EBCDIC - ASCII

2001-02-12 Thread Kurt J. Lidl

On Mon, Feb 12, 2001 at 02:01:55PM +, Aled Morris wrote:
 On Thu, 1 Feb 2001, Warner Losh wrote:
 
 Even the name (dd) comes from IBM's control language (JSYS?).
 
 I don't disagree, but someone once told me the name came from what
 it does "Convert and Copy a file" - see dd(1) -  but "cc" was already
 taken...

While not completely on topic, here's the question thread from
alt.folklore.computer that started (and answered it):

http://www.web.us.uu.net/staff/djm/lore/dd-origin

-Kurt


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: EBCDIC - ASCII

2001-02-12 Thread Garance A Drosihn

At 2:01 PM + 2/12/01, Aled Morris wrote:
On Thu, 1 Feb 2001, Warner Losh wrote:

Even the name (dd) comes from IBM's control language (JSYS?).

I don't disagree, but someone once told me the name came from
what it does "Convert and Copy a file" - see dd(1) -  but "cc"
was already taken...

For what it's worth, I've also heard this.  In fact, I heard
it from a certain  Jon "Maddog" Hall  just last week...
-- 
Garance Alistair Drosehn=   [EMAIL PROTECTED]
Senior Systems Programmer   or  [EMAIL PROTECTED]
Rensselaer Polytechnic Instituteor  [EMAIL PROTECTED]


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: EBCDIC - ASCII

2001-02-12 Thread Wes Peters

Aled Morris wrote:
 
 On Thu, 1 Feb 2001, Warner Losh wrote:
 
 Even the name (dd) comes from IBM's control language (JSYS?).
 
 I don't disagree, but someone once told me the name came from what
 it does "Convert and Copy a file" - see dd(1) -  but "cc" was already
 taken...

dd == device dump; the original use of dd was to move blocks of data
between disks and tape.

-- 
"Where am I, and what am I doing in this handbasket?"

Wes Peters Softweyr LLC
[EMAIL PROTECTED]   http://softweyr.com/


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: EBCDIC - ASCII

2001-02-02 Thread Peter Pentchev

On Fri, Feb 02, 2001 at 12:34:47AM -0500, Louis A. Mamakos wrote:
   Warner Losh writes:
  
Even the name (dd) comes from IBM's control language (JSYS?).
  
  Huh! I never realized that. 
  //GO.SYSIN DD *
  ...
  //
  Where are my punch cards? :-)
 
 man 6 bcd

Come to think of it, since bcd(6) doubles as ppt(6), why isn't there
already something like the attached script? :)

G'luck,
Peter

-- 
This sentence was in the past tense.

#!/usr/bin/perl -wT
# $Id: unppt.pl,v 1.1 2001/02/02 10:33:42 roam Exp $

# unppt - a trivial script to convert ppt(6)'s output back to ASCII.

use strict;

MAIN:{
my $line;   # input line processed

while (defined($line = )) {
chomp $line;
next unless $line =~ /^\|([ o]*)\.([ o]*)\|$/;

$line = "$1$2";
$line =~ tr/ o/01/;
print pack("B*", $line);
}
print "\n";
}


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: EBCDIC - ASCII

2001-02-02 Thread Mike Nowlin


 At 1:33 PM -0800 1/29/01, Josef Grosch wrote:
 Does anybody know of an EBCDIC to ASCII converter? I thought
 that at one time FreeBSD had one of these.
 
 Note there are multiple ideas of what it means to be EBCDIC.
 Alphanumerics stay the same between them, of course, but a
 few of the special characters (braces, brackets, accent-grave)
 move around.

Unfortunately, I have to deal with an application written in EDX (go try
and find info on THAT archaic language!) on an IBM RS/6000 that uses
EBCDIC...  After digging through the sources on that machine, I was able
to come up with a somewhat decent translation table.  It's not complete,
but it handles the alphanum and punctuation characters.

I just stuck it up at http://www.argos.org/~mike/ebc2asc.c

(It's just a test program - you'll need to modify it a little bit to
handle "normal" stuff, but that's fairly simple.)

(Suggestions to improve the translation table are welcome.)

mike




To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: EBCDIC - ASCII

2001-02-01 Thread Warner Losh

In message [EMAIL PROTECTED] Peter Pentchev writes:
: Actually, dd(1) has four different EBCDIC encodings and two
: different ASCII encodings.  People might want to remember
: that different BSD utilities might indeed have their roots
: in EBCDIC times :)

Even the name (dd) comes from IBM's control language (JSYS?).

Warner


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: EBCDIC - ASCII

2001-02-01 Thread Jean-Marc Zucconi

 Warner Losh writes:

  Even the name (dd) comes from IBM's control language (JSYS?).

Huh! I never realized that. 
//GO.SYSIN DD *
...
//
Where are my punch cards? :-)

Jean-Marc

-- 
Jean-Marc Zucconi -- PGP Key: finger [EMAIL PROTECTED] [KeyID: 400B38E9]


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: EBCDIC - ASCII

2001-02-01 Thread Louis A. Mamakos

  Warner Losh writes:
 
   Even the name (dd) comes from IBM's control language (JSYS?).
 
 Huh! I never realized that. 
 //GO.SYSIN DD *
 ...
 //
 Where are my punch cards? :-)

man 6 bcd




To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: EBCDIC - ASCII

2001-01-31 Thread Garance A Drosihn

At 1:33 PM -0800 1/29/01, Josef Grosch wrote:
Does anybody know of an EBCDIC to ASCII converter? I thought
that at one time FreeBSD had one of these.

Note there are multiple ideas of what it means to be EBCDIC.
Alphanumerics stay the same between them, of course, but a
few of the special characters (braces, brackets, accent-grave)
move around.

I'm pretty sure there are some programs in the ports
collection which can deal with these.
-- 
Garance Alistair Drosehn=   [EMAIL PROTECTED]
Senior Systems Programmer   or  [EMAIL PROTECTED]
Rensselaer Polytechnic Instituteor  [EMAIL PROTECTED]


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: EBCDIC - ASCII

2001-01-31 Thread Luigi Rizzo

 At 1:33 PM -0800 1/29/01, Josef Grosch wrote:
 Does anybody know of an EBCDIC to ASCII converter? I thought
 that at one time FreeBSD had one of these.
 
 Note there are multiple ideas of what it means to be EBCDIC.
 Alphanumerics stay the same between them, of course, but a
 few of the special characters (braces, brackets, accent-grave)
 move around.

isn't so for ASCII chars 128 as well ?

cheers
luigi
--+-
 Luigi RIZZO, [EMAIL PROTECTED]  . ACIRI/ICSI (on leave from Univ. di Pisa)
 http://www.iet.unipi.it/~luigi/  . 1947 Center St, Berkeley CA 94704
 Phone: (510) 666 2927
--+-



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: EBCDIC - ASCII

2001-01-31 Thread Lyndon Nerenberg

 "Luigi" == Luigi Rizzo [EMAIL PROTECTED] writes:

Luigi isn't so for ASCII chars 128 as well ?

There are no ASCII characters  128.

--lyndon


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: EBCDIC - ASCII

2001-01-31 Thread Dan Bongert

Try dd:

dd if=infile of=outfile conf=ascii

On 31-Jan-2001 Garance A Drosihn wrote:
 At 1:33 PM -0800 1/29/01, Josef Grosch wrote:
Does anybody know of an EBCDIC to ASCII converter? I thought
that at one time FreeBSD had one of these.
 
 Note there are multiple ideas of what it means to be EBCDIC.
 Alphanumerics stay the same between them, of course, but a
 few of the special characters (braces, brackets, accent-grave)
 move around.
 
 I'm pretty sure there are some programs in the ports
 collection which can deal with these.

-- 
Dan Bongert [EMAIL PROTECTED]
SSCC Unix System Administrator  (608) 262-9857


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: EBCDIC - ASCII

2001-01-31 Thread Garance A Drosihn

At 8:42 AM -0800 1/31/01, Luigi Rizzo wrote:
   At 1:33 PM -0800 1/29/01, Josef Grosch wrote:
  Does anybody know of an EBCDIC to ASCII converter? I thought
  that at one time FreeBSD had one of these.

  Note there are multiple ideas of what it means to be EBCDIC.
  Alphanumerics stay the same between them, of course, but a
  few of the special characters (braces, brackets, accent-grave)
  move around.

isn't so for ASCII chars 128 as well ?

yes, but ACSII has most characters that you care about  128.
For instance, C-programs will probably be unhappy if you get
the wrong translation on curly-braces "{}", and perl programs
will probably be unhappy if you get the wrong translation on
square-brackets "[]".  Most versions of ascii have those in
the same place, while the various versions of ebcdic move
those characters around.

Now, it's perfectly reasonable to try 'dd's conversion, and
see if that works for you.  But if it doesn't, then rummage
around thru the ports collection, and see if there's something
there that knows about the different versions of ebcdic.  It
seems to me that I came across those once.

-- 
Garance Alistair Drosehn=   [EMAIL PROTECTED]
Senior Systems Programmer   or  [EMAIL PROTECTED]
Rensselaer Polytechnic Instituteor  [EMAIL PROTECTED]


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: EBCDIC - ASCII

2001-01-31 Thread Peter Pentchev

On Wed, Jan 31, 2001 at 02:37:43PM -0500, Garance A Drosihn wrote:
[snip good explanation why EBCDIC encoding diffs matter]
 
 Now, it's perfectly reasonable to try 'dd's conversion, and
 see if that works for you.  But if it doesn't, then rummage
 around thru the ports collection, and see if there's something
 there that knows about the different versions of ebcdic.  It
 seems to me that I came across those once.

Actually, dd(1) has four different EBCDIC encodings and two
different ASCII encodings.  People might want to remember
that different BSD utilities might indeed have their roots
in EBCDIC times :)

G'luck,
Peter

-- 
because I didn't think of a good beginning of it.


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: EBCDIC - ASCII

2001-01-29 Thread Poul-Henning Kamp

In message [EMAIL PROTECTED], Josef Grosch writes:

Does anybody know of an EBCDIC to ASCII converter? I thought that at one
time FreeBSD had one of these.

man 1 dd

--
Poul-Henning Kamp   | UNIX since Zilog Zeus 3.20
[EMAIL PROTECTED] | TCP/IP since RFC 956
FreeBSD committer   | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: EBCDIC - ASCII

2001-01-29 Thread Drew Eckhardt

In message [EMAIL PROTECTED], [EMAIL PROTECTED] write
s:

Does anybody know of an EBCDIC to ASCII converter? I thought that at one
time FreeBSD had one of these.

This is a standard dd(1) feature.  More specifically, you want to use the
conv=ascii option.


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: EBCDIC - ASCII

2001-01-29 Thread Thomas David Rivers

Josef Grosch [EMAIL PROTECTED] wrote:
 
 
 Does anybody know of an EBCDIC to ASCII converter? I thought that at one
 time FreeBSD had one of these.
 
 
 Josef

 Check out the `dd' command.. particularly the `conv' suboption:

 conv= value[, value ...]
  Where value is one of the symbols from the following list.

  ascii, oldascii
   The same as the unblock value except that characters
   are translated from EBCDIC to ASCII before the records
   are converted.  (These values imply unblock if the
   operand cbs is also specified.)  There are two conver-
   sion maps for ASCII. The value ascii specifies the rec-
   ommended one which is compatible with System V.  The
   value oldascii specifies the one used in historic ATT
   and pre-4.3BSD-reno systems.

- Dave Rivers -

--
[EMAIL PROTECTED] Work: (919) 676-0847
Get your mainframe (370) `C' compiler at http://www.dignus.com


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: EBCDIC - ASCII

2001-01-29 Thread Josef Grosch

On Mon, Jan 29, 2001 at 10:35:20PM +0100, Poul-Henning Kamp wrote:
 In message [EMAIL PROTECTED], Josef Grosch writes:
 
 Does anybody know of an EBCDIC to ASCII converter? I thought that at one
 time FreeBSD had one of these.
 
 man 1 dd

Doh! Time to re-read the man pages. Thanks

Josef

-- 
Josef Grosch   | Another day closer to a | FreeBSD 4.2
[EMAIL PROTECTED] |   Micro$oft free world  | www.bafug.org



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message