In article <slrnku95jj.c0v.o@owen-marshall-4.local>, Owen Marshall <o@owenmarshall.invalid> wrote:
> On 2013-07-12, Joel Goldstick <joel.goldst...@gmail.com> wrote: > > --047d7bdc8be492d67804e154c580 Content-Type: text/plain; charset=UTF-8 > > > > On Fri, Jul 12, 2013 at 2:11 PM, Wayne Werner <wa...@waynewerner.com> > > wrote: > > > >> Is anyone aware of a UTF-EBCDIC[1] decoder? > >> > >> While Python does have a few EBCDIC dialects in the codecs, it does > >> not have the (relatively new?) UTF-EBCDIC one. > >> > >> Additionally, if anyone is aware of a Python tool that can unpack a > >> mainframe PDS file, that would also be worthwhile. > >> > >> > >> Thanks, Wayne > >> > >> [1]: > >> https://en.wikipedia.org/wiki/**UTF-EBCDIC<https://en.wikipedia.org/wiki/UT > >> F-EBCDIC> > >> -- > >> http://mail.python.org/**mailman/listinfo/python-list<http://mail.python.or > >> g/mailman/listinfo/python-list> > >> > > > > > > I can't help you. I'm astonished. Trying to imagine the work > > environment where this technology would be necessary > > > > Ask any poor shmuck who has ever had to consume files created by the > government -- especially stuff from the Social Security Administration > -- and they'll tell horror stories about EBCDIC. > > Typically I've seen ``iconv'' used for this task, so I'd love to see a > native solution... Unix command-line: dd conv=ascii or perhaps dd conv=ascii,unblock cbs=80 ibs=80 if=/dev/cr of=/dev/lp (*) (*) My dd-fu has tarnished with age. Forgive me if I've munged the incantation somewhat. -- http://mail.python.org/mailman/listinfo/python-list