DynamicEBCDICDecoder

Configuration file

DynamicEBCDICDecoder.properties

Class name

com.ebd.hub.datawizard.parser.DynamicEBCDICDecoder

Description


This preparser checks the character encoding of a message (ASCII or EBCDIC) and recodes it if necessary.

The check proceeds like the following.


  • Parameter checkchars specifies how many characters are read from the file.

  • Then the algorithm checks which characters can be represented in ASCII and how many cannot.

  • If in the end more characters can be represented in ASCII, an ASCII encoding is assumed, otherwise EBCDIC. Important note: An EBCDIC coded whitespace is represented as @ in ASCII and is therefore recognized as ASCII-representable by the check algorithm. So if you read in a complete file, ASCII erroneously wins whenever there are enough whitespaces in the EBCDIC file. You can prevent this by choosing advantageous values for parameters checkchars and skipchars, i.e. you try to choose values so that the checked text has as few whitespaces as possible.

Parameters


Parameter

Description

checkchars

(optional) Number of characters to be checked. Default: 100

skipchars

(optional) Number of characters skipped from the beginning of the file during format checking. Default: 0

asciicharset

(optional) Character encoding to recognize ASCII input data. Default: 8859_1

ebcdiccharset

(optional) Character encoding to recognize EBCDIC input data. Default: cp273

outcharset

(optional) Character encoding for the output data of the preparer. Default: 8859_1

Example


DynamicEBCDICDecoder.properties
checkchars=7
skipchars=0
asciicharset=8859_1
ebcdiccharset=cp273
outcharset=8859_1