# Prevent the Default Conversion of a Character Set

You can prevent the default conversion of text to the operating system code page, and specify that Filter retain the original character encoding of the document when it is available. Any document identified as containing more than one character encoding is converted to the first encoding encountered in the file.

To prevent the default conversion, instantiate the Filter object using the constructor `Filter(String outputCharSet, UInt32 filterFlags)`, and set the `FilterConstant.FilterFlagConstant` argument to `FILTERFLAG_NODEFAULTCHARSETCONVERT`. For example:

    objFilter = new Filter(outputCharSet, FilterConstant.FilterFlagConstant.FILTERFLAG_NODEFAULTCHARSETCONVERT);

This setting overrides the source or target character set specified in the API.

© Copyright 2016-2020 Micro Focus or one of its affiliates | Send documentation feedback Close Send documentation feedback To open the configured email client on this computer, open an email window. Otherwise, copy the information below to a mail client, and then send this email to swpdl.idoldocsfeedback@microfocus.com. We appreciate your feedback! Product: Topic Title: Help Topic: Feedback:

_FT_HTML5_bannerTitle.htm