Skip to main content
Version: 4.6.x.x LTS

CharsetFilter

You can use this filter to convert the HTTP request query and body from one character set to another. If it is not possible to convert a body entirely, then the CharsetFilter tries to convert as much as possible, and replaces all non-convertible chars by a question mark ?.

The CharsetFilter only handles requests of the content type application/x-www-form-urlencoded.

The filter has the following trace group: BC.Tracer.DebugProfile.IW4CharSetFlt

Classname
 ch::nevis::isiweb4::filter::rewrite::CharsetFilter
Library
libRewriteFilters.so.1

Configuration

ConvertFrom

  • Type: string <Encoding>
  • Usage Constraints: required, basic
  • Defines the charset to convert from. I.E. UTF-8.

ConvertTo

  • Type: string <Encoding>
  • Usage Constraints: required, basic
  • Defines the charset to convert to. I.E. ISO-8859-1.

ConvertQuery

  • Type: boolean
  • Usage Constraints: optional
  • Default: false
  • Converts the query if set to true.

ConvertBody

  • Type: boolean
  • Usage Constraints: optional
  • Default: true
  • Converts the body if set to true.

IncomingCharsetStrategy

  • Type: enum

  • Possible values: IGNORE, KEEP, CONVERT

  • Usage Constraints: optional

  • Default: CONVERT

  • Defines the conversion strategy for the body, if the incoming charset was set but differs from the one set in the attribute ConvertFrom.

    The following values are available:

    • IGNORE: Ignore the incoming charset, always convert fromConvertFromtoConvertTo.
    • KEEP: Keep the incoming charset, do not convert the body.
    • CONVERT: Try to convert from the incoming charset toConvertTo.

Example

You can find an example in the installed nevisProxy package (go to examples/various/CharsetFilter.example).