Ebcdic File Viewer

Ebcdic is a Python package adding additional EBCDIC codecs for data exchange with legacy system. It works with Python 2.7 and Python 3.4+. EBCDIC is short for Extended Binary Coded Decimal Interchange Code and is a family of character encodings that is mainly used on mainframe computers. Use the vi editor to view and modify the contents of the file zero.config.EBCDIC. Vi zero.config.EBCDIC; Convert the zero.config.EBCDIC file to ASCII and replace the original version of the zero.config file: iconv -f IBM-1047 -t ISO8859-1 zero.config.EBCDIC zero.config; Use FTP to transfer an ASCII file, in binary mode, to your workstation for.

EBCDIC File Viewer

The EBCDIC File Viewer is a translator from the IBM EBCDIC encoding to ASCII. It is usefull when you have to process plain data from the Host without any linebreak. When you open a file it automatically tries to find out the fixed length width for files without linebreak. Also the viewer checks whether your file is EBCDIC or ASCII encoded. You can add cobol like datastructures such that the viewer can add columnwire seperators. If you use the comp-5 option, you can also display binary numbers within your file.

Latest version

Released:

Additional EBCDIC codecs

Project description

ebcdic is a Python package adding additional EBCDIC codecs for dataexchange with legacy system. It works with Python 2.7 and Python 3.4+.

EBCDIC is short for Extended BinaryCoded Decimal Interchange Code and is a family of character encodings that ismainly used on mainframe computers. There is no real point in using it unlessyou have to exchange data with legacy systems that still only support EBCDICas character encoding.

Installation

The ebcdic package is available from https://pypi.python.org/pypi/ebcdicand can be installed using pip:

Example usage

To encode 'hello world' on EBCDIC systems in German speaking countries,use:

Supported codecs

The ebcdic package includes EBCDIC codecs for the following regions:

  • cp290 - Japan (Katakana)
  • cp420 - Arabic bilingual
  • cp424 - Israel (Hebrew)
  • cp833 - Korea Extended (single byte)
  • cp838 - Thailand
  • cp870 - Eastern Europe (Poland, Hungary, Czech, Slovakia, Slovenia,Croatian, Serbia, Bulgarian); represents Latin-2
  • cp1097 - Iran (Farsi)
  • cp1140 - Australia, Brazil, Canada, New Zealand, Portugal, South Africa,USA
  • cp1141 - Austria, Germany, Switzerland
  • cp1142 - Denmark, Norway
  • cp1143 - Finland, Sweden
  • cp1144 - Italy
  • cp1145 - Latin America, Spain
  • cp1146 - Great Britain, Ireland, North Ireland
  • cp1147 - France
  • cp1148 - International
  • cp1148ms - International, Microsoft interpretation; similar to cp1148except that 0x15 is mapped to 0x85 (“next line”) instead if 0x0a(“linefeed”)
  • cp1149 - Iceland

It also includes legacy codecs:

  • cp037 - Australia, Brazil, Canada, New Zealand, Portugal, South Africa;similar to cp1140 but without Euro sign
  • cp273 - Austria, Germany, Switzerland; similar to cp1141 but without Eurosign
  • cp277 - Denmark, Norway; similar to cp1142 but without Euro sign
  • cp278 - Finland, Sweden; similar to cp1143 but without Euro sign
  • cp280 - Italy; similar to cp1141 but without Euro sign
  • cp284 - Latin America, Spain; similar to cp1145 but without Euro sign
  • cp285 - Great Britain, Ireland, North Ireland; similar to cp1146 butwithout Euro sign
  • cp297 - France; similar to cp1147 but without Euro sign
  • cp500 - International; similar to cp1148 but without Euro sign
  • cp500ms - International, Microsoft interpretation; identical tocodecs.cp500 similar to ebcdic.cp500 except that 0x15 is mapped to 0x85(“next line”) instead if 0x0a (“linefeed”)
  • cp871 - Iceland; similar to cp1149 but without Euro sign
  • cp875 - Greece; similar to cp9067 but without Euro sign and a fewother characters
  • cp1025 - Cyrillic
  • cp1047 - Open Systems (MVS C compiler)
  • cp1112 - Estonia, Latvia, Lithuania (Baltic)
  • cp1122 - Estonia; similar to cp1157 but without Euro sign
  • cp1123 - Ukraine; similar to cp1158 but without Euro sign
Ebcdic File Viewer

Codecs in the standard library overrule some of these codecs. At the time ofthis writing this concerns cp037, cp273 (since 3.4), cp500 and cp1140.

To see get a list of EBCDIC codecs that are already provided by differentsources, use ebcdic.ignored_codec_names(). For example, with Python 3.6the result is:

Unsupported codecs

According to acomprehensive list of code pages,there are additional codecs this package does not support yet. Possiblereasons and solutions are:

  1. It’s a double byte codec, e.g. cp834 (Korea). Technically CodecMappercan easily support them by increasing the mapping size from 256 to 65536.Due lack of test date and access to Asian mainframes this was deemed tooexperimental for now.
  2. The codec contains combining characters, e.g. cp1132 (Lao) which allowsto represent more than 256 characters combining several characters.
  3. Java does not include a mapping for the respective code page, e.g.cp410/880 (Cyrillic). You can add such a codec based on the informationfound at the link above and submit an enhancement request for the Javastandard library. Once it is released, simply add the new codec tothe build.xml as described below.
  4. I missed a codec. Simply open an issue on Github athttps://github.com/roskakori/CodecMapper/issues and it will be added withthe next version.

Source code

These codecs have been generated using CodecMapper, available fromhttps://github.com/roskakori/CodecMapper. Read the README in order toto build the ebcdic package from source.

To add another 8 bit EBCDIC codec just extend the ant target ebcdic inbuild.xml using a line like:

Replace XXX by the number of the 8 bit code page you want to include.

Then run:

to build and test the distribution.

The ebcdic/setup.py automatically includes the new encoding in the packageand ebcdic/__init__.py registers it during import ebcdic, so nofurther steps are needed.

Changes

Version 1.1.1, 2019-08-09

  • Moved license information from README to LICENSE (#5). This required thedistribution to change from sdist to wheel because apparently it is amajor challenge to include a text file in a platform independent way (#11).

    Sadly this breaks compatibility with Python 2.6, 3.1, 3.2 and 3.3. If youstill need ebcdic with one of these Python versions, useebcdic-1.0.0.

    This took several attempts and intermediate releases that where broken indifferent ways on different platforms. To prevent people from accidentallyinstalling one of these broken releases they have been removed from PyPI.If you still want to take a look at them, use therespective tags.

Version 1.0.0, 2019-06-06

  • Changed development status to “Production/Stable”.
  • Added international code pages cp500ms and cp1148ms which are the Microsoftinterpretations of the respective IBM code pages. The only difference isthat 0x1f is mapped to 0x85 (“next line”) instead of 0x0a (“new line”).Note that codecs.cp500 included with the Python standard library also usesthe Microsoft interpretation (#4).
  • Added Arabian bilingual code page 420.
  • Added Baltic code page 1112.
  • Added Cyrillic code page 1025.
  • Added Eastern Europe code page 870.
  • Added Estonian code pages 1122 and 1157.
  • Added Greek code page 875.
  • Added Farsi Bilingual code page 1097.
  • Added Hebrew code page 424 and 803.
  • Added Korean code page 833.
  • Added Meahreb/French code page 425.
  • Added Japanese (Katakana) code page 290.
  • Added Thailand code page 838.
  • Added Turkish code page 322.
  • Added Ukraine code page 1123.
  • Added Python 3.5 to 3.8 as supported version.
  • Improved PEP8 conformance of generated codecs.

Version 0.7, 2014-11-17

  • Clarified which codecs are already part of the standard library and thatthese codecs overrule the ebcdic package. Also added a functionebcdic.ignored_codec_names() that returns the name of the EBCDIC codecsprovided by other means. To obtain access to ebcdic codecs overruled bythe standard library, use ebcdic.lookup().
  • Cleaned up (PEP8, __all__, typos, …).

Version 0.6, 2014-11-15

  • Added support for Python 2.6+ and 3.1+ (#1).
  • Included a modified version of gencodec.py that still builds mapsinstead of tables so the generated codecs work with Python versions earlierthan 3.3. It also does a from __future__ import unicode_literals so thecodecs even work with Python 2.6+ using the same source code. As a sideeffect, this simplifies building the codecs because it removes the the needfor a local copy of the cpython source code.

Version 0.5, 2014-11-13

  • Initial public release

Release historyRelease notifications | RSS feed

1.1.1

1.0.0

0.7.0

0.6.0

0.5.0

Ebcdic

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Ebcdic File Viewer Notepad++

Files for ebcdic, version 1.1.1
Filename, sizeFile typePython versionUpload dateHashes
Filename, size ebcdic-1.1.1-py2.py3-none-any.whl (128.5 kB) File type Wheel Python version 3.6 Upload dateHashes
Close

Hashes for ebcdic-1.1.1-py2.py3-none-any.whl

Ebcdic File Viewer Online

Hashes for ebcdic-1.1.1-py2.py3-none-any.whl
AlgorithmHash digest
SHA25633b4cb729bc2d0bf46cc1847b0e5946897cb8d3f53520c5b9aa5fa98d7e735f1
MD568ae042f2c36ab2a4f9c664a657a6478
BLAKE2-2560d2f633031205333bee5f9f93761af8268746aa75f38754823aabb8570eb245b