python As400

Jarek Zgoda jzgoda at gazeta.usun.pl
Tue Jan 27 11:19:44 EST 2004


Enrique <enrique.palomo at xgs-spain.com> pisze:

> 2.- files in as400 are in ebcdic. But i need to work in ascii to sort de
> data later. Can i work in as400 with ascii files?

Sure. You can use codecs.open() to open such files, this will provide
you with transparent decoding to unicode objects during reading. To
write ascii, use encode() function of unicode object to get string in
desired encoding. I found working with unicode objects more convenient,
although re.UNICODE is broken.

-- 
Jarek Zgoda
Unregistered Linux User #-1
http://www.zgoda.biz/ JID:zgoda-a-chrome.pl http://zgoda.jogger.pl/



More information about the Python-list mailing list