DynamicCharsetRecodePreparser

Group

Preparsers

Class name

com.ebd.hub.datawizard.parser.DynamicCharsetRecodePreparser

Function

This preparser determines a file encoding on the basis of the input file name, which is then used instead of the configured encoding in the profile.

Configuration File

DynamicCharsetRecodePreparser.properties

Description

This preparser reads in the input data with the charset that is dynamically determined from the input file name with the settings in the properties file. This is followed by a conversion of the input data into the file encoding that is set in phase 2 of the profile and the file is passed on to the profile like that. The properties configuration file contains the file names and the associated charsets. The following parameters are available.

defaultcharset

Default encoding if no matching filename for file pattern is found.

entry.search.<n>

File pattern. Index n is an integer and starts with 1. For regular expressions, you have to use the prefix regex:

entry.charset.<n>

Encoding for the corresponding file pattern. Index n is an integer and starts with 1.

Example

DynamicCharsetRecodePreparser.properties
defaultcharset=8859_1
entry.search.1=MyFile1.*
entry.charset.1=BM850
entry.search.2=MyFile2.*
entry.charset.2=UTF8
entry.search.3=MyFile3.*
entry.charset.3=UTF-16